Skip to content
Discussion options

You must be logged in to vote

It's basically checking that the current working directory is a parent directory of the targeted file. This is intended as a security measure to prevent zed from accessing files that it shouldn't have access to.

We're using filepath.IsLocal to check this, and from the docs:

// IsLocal reports whether path, using lexical analysis only, has all of these properties:
//
//   - is within the subtree rooted at the directory in which path is evaluated
//   - is not an absolute path
//   - is not empty
//   - on Windows, is not a reserved name such as "NUL"

I looked it up, and the working directory for a zed container should already be the root. Have you tried removing the leading slash? I think …

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@heytrav
Comment options

@tstirrat15
Comment options

Answer selected by heytrav
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants