-
-
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
ZipArchiveFS DirectoryExists
doesn't work as expected
#79
Comments
Okay, can't even Open any files, even with paths returned by EnumeratePaths (which also doesn't work outside of the root folder). I suspect it has to do with the conditionals replacing |
Okay - it was actually the opposite. Forcing it to use the netstandard2.0 version made accessing files work, at least. Haven't checked the directory test. |
Maybe related, in // .Net4.5 uses a backslash as directory separator. and then the string is fullname is being replaced with the correct separator: zio/src/Zio/FileSystems/ZipArchiveFileSystem.cs Lines 59 to 69 in a563d0c
However, .Replace returns a new string; it doesn't manipulate the current string. So the result is never being used.
I think this code has to be moved into the
To for example: _entries = _archive.Entries.ToDictionary(e =>
{
#if NETFRAMEWORK // .Net4.5 uses a backslash as directory separator
var fullName = e.FullName.Replace('/', DirectorySeparator);
#else
var fullName = e.FullName.Replace('\\', DirectorySeparator);
#endif
return fullName.ToLowerInvariant();
}, e => e); However, if you install the NuGet package as .NET Standard 2.0 in .NET Framework, it will use the |
Unless DirectoryEntries have been created using Zio, DirectoryExists on ZipArchiveFileSystems will return false for any path except the root, despite files containing the path existing.
While zip files themselves have no notion of directories, it is inconsistent and inconvenient if this is not handled uniformly by this abstration layer.
This is occuring while using Zio as a NuGet package on .net 4.6.2
The text was updated successfully, but these errors were encountered: