Closed LimpingNinja closed 5 years ago
'/mnt/c/path/here'
Also does not work, I see the documentation say that this typically does but I'm not sure why unless you were specifically running it under WSL which doesn't seem correct for x-platform. Looks like the assumptions made for this specifically tie across the library.
I'm using a physical file system and a subsystem and if I'm using OSX it works perfectly fine, but on Windows it fails with 'Path 'c:/path/here' must be absolute'
This is by design. The README says the following:
With uniform paths, this filesystem on Windows is working like on a Windows Subsystem Linux
Note the word "like", it doesn't say Zio does this only on WSL. You always use the unix path-style, even on Windows.
'/mnt/c/path/here'
Also does not work, I see the documentation say that this typically does but I'm not sure why unless you were specifically running it under WSL which doesn't seem correct for x-platform. Looks like the assumptions made for this specifically tie across the library.
Do you get an exception? Does the program has access to the folder?
When I tried the latest version on .NET Core 2.2.5 (x64) it's working fine:
This is by design. The README says the following
Yes, I cited that in my update; that's my fault.
Do you get an exception? Does the program has access to the folder?
It has access, but ultimately it appeared to be my fault here - sorry for the false message; I somehow missed a directory exist call that was using standard filesystem check vs. the Zio check.
Facing with exactly same problem on Windows.
I understand I must use a subPath formatted as "/mnt/c/path/here"
to SubFileSystem ctor but my question is:
Is there a simple way to convert "c:\path\here\
" to "/mnt/c/path/here
"?
Is there a simple way to convert "c:\path\here\" to "/mnt/c/path/here"?
fs.ConvertPathFromInternal("/mnt/c/path/here")
should do it assuming that fs
is a PhysicalFileSystem
Thanks! In my case, fs.ConvertPathFromInternal("c:\path\here\") produce exactly what I was expected: "/mnt/c/path/here"
I'm using a physical file system and a subsystem and if I'm using OSX it works perfectly fine, but on Windows it fails with 'Path 'c:/path/here' must be absolute'
var path = "c:/path/here/" fs = new PhysicalFileSystem(); subfs = new SubFileSystem(fs, path);
This also fails on slower 'C:\path\here\'
I thought it was the trailing slash removal until I followed and noted that AssertAbsolute throws even with the trailing slash since the path does not start with / but c:/