Closed Qeynos closed 3 months ago
the slashes are just the key name and is OS independent really. The Path.Separator should be OS specific and could be used to figure that out but not everyone wants the keys to be automatically converted.
In Linux, the 'storage\first\error.jpg' in a non-standard zip file is considered to be a filename without a path. Even if you use Path.Combine to combine entry.Key with the path, it will not correct this error.
Like I said, this is a key that is the same on all platforms with those slashes....a zip is a series of key/values.
The slash being different across platforms is an implementation detail you need to fix yourself or use a helper method to convert them.
I have an old zip file that may not have been created following the standard specifications. When I use SharpCompress to decompress it, the backslash character is merged with the file name, causing the extracted files to have incorrect paths, such as "/home/test/storage\first\error.jpg". I need to use code like this to solve the problem. I wonder if there has been any consideration for compatibility with non-standard zip formats.