Skip to content

Instantly share code, notes, and snippets.

@sailro
Created February 9, 2018 23:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sailro/3a808fd5c015bb973f30cbad76c9b9a3 to your computer and use it in GitHub Desktop.
Save sailro/3a808fd5c015bb973f30cbad76c9b9a3 to your computer and use it in GitHub Desktop.
var zip = ZipArchive.Read(filename);
foreach (var entry in zip.Entries)
{
entry.LocalFileHeader.Filename = entry.LocalFileHeader.Filename.Replace("\\", "/");
entry.CentralDirectoryHeader.Filename = entry.LocalFileHeader.Filename;
}
zip.Write(filename);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment