Check slash orientation as DotNetZip is always unix-like even on

Windows.
This commit is contained in:
2017-05-16 14:44:52 +01:00
parent d7412a5c85
commit 00556953d2

View File

@@ -1679,7 +1679,10 @@ namespace osrepodbmgr.Core
{
DBFile file;
if(!Context.hashes.TryGetValue(entryName, out file))
throw new ArgumentException("Cannot find requested zip entry in hashes dictionary");
{
if (!Context.hashes.TryGetValue(entryName.Replace('/', '\\'), out file))
throw new ArgumentException("Cannot find requested zip entry in hashes dictionary");
}
// Special case for empty file, as it seems to crash when SharpCompress tries to unLZMA it.
if(file.Length == 0)