You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Obsolete documentation under ZipEntry unix style path separator #415
Create a ZipEntry ("somefolder\someentryname") with Windows style separator and add it to a zipfile
Try to find a zipentry with zipfile.FindEntry(@"somefolder\someentryname")
The FindEntry cannot find it.
Version 1.2.0:
In the documentation the ZipEntry constructor says: /// The convention for names is 'unix' style paths with no device names and /// path elements separated by '/' characters. This is not enforced see <see cref="CleanName(string)">CleanName</see> /// on how to ensure names are valid if this is desired.
In the version 0.86.0 the ZipEntry documentation says the unix style separator is not enforced and indeed it is not enforced. See (line 254): name = entry.name;
It's a breaking change from 0.86.0 to 1.2.0 (It's present in 1.0.0 aswell). We, unfortunately, used the FindEntry with Windows "\" separator and worked, however, it broke upon upgrading to newer versions.
Thanks for linking the commit. I'm still confused about why this change was made in the first place. It seems to just break use cases, but I presume it was solve a specific one?
Not sure what the current situation is with slashes in ZipOutputStream, but I think there have been other attempts to fix the delete issues in ZipFile?
Activity
Numpsy commentedon Jan 21, 2020
The change to call CleanName is potentially rolled by by #362
hoborm commentedon Jan 22, 2020
You are right. Thank you for letting me know. This is a duplication of #341
piksel commentedon Jan 27, 2020
Thanks for linking the commit. I'm still confused about why this change was made in the first place. It seems to just break use cases, but I presume it was solve a specific one?
Numpsy commentedon Jan 27, 2020
The bug tracker link attached to the commit seems dead, but there is an archived version at https://web.archive.org/web/20100703011409/http://bugtracker.sharpdevelop.net/issue/ViewIssue.aspx?id=1676&PROJID=2 which mentions converting between forwards and backwards slashes.
Not sure what the current situation is with slashes in ZipOutputStream, but I think there have been other attempts to fix the delete issues in ZipFile?