-
-
Notifications
You must be signed in to change notification settings - Fork 61
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix bug on SubFileSystem.ConvertPathToDelegate #50
Comments
PR welcome. |
Actually I don't understand the issue. Can you elaborate? What is a current directory in a sub file system? |
zio/src/Zio/FileSystems/SubFileSystem.cs Lines 65 to 69 in d245c2c
This implementation is fine when path is absolute. The problem happens when path is relative because it doesn't consider the current working directory. path.ToRelative won't affect relative path since itself is already an relative path and the result safePath will be directly appended to SubPath as if it were an absolute path.
|
Again, I don't understand, there is no concept of current directory in Zio. |
Relative path is literally the path relative to the current working directory. zio/src/Zio/UPathExtensions.cs Lines 40 to 50 in 8026d37
Then, I'll be sure to pass only absolute path to ConvertPathToDelegate after prepending current working directory on relative path case if you don't want to introduce current working directory concept.
|
It can't. A current working directory is only relevant for a system wide current directory. In Zio, you can have multiple filesystems in // that don't share anything. So a current directory has no meaning. Zio works only with absolute paths when accessing a filesystems. |
It just prepends root path to the relative path without considering current working directory.
zio/src/Zio/FileSystems/SubFileSystem.cs
Line 68 in d245c2c
Can you implement this two features?
Thank you.
The text was updated successfully, but these errors were encountered: