fix auto-updates
This commit is contained in:
@@ -100,9 +100,18 @@ namespace Torch.Managers
|
|||||||
|
|
||||||
_log.Debug($"Unzipping {file.FullName}");
|
_log.Debug($"Unzipping {file.FullName}");
|
||||||
var targetFile = Path.Combine(extractPath, file.FullName);
|
var targetFile = Path.Combine(extractPath, file.FullName);
|
||||||
|
|
||||||
|
// if its a directory
|
||||||
|
if (Path.GetFileName(targetFile).Length == 0)
|
||||||
|
{
|
||||||
|
Directory.CreateDirectory(targetFile);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
_fsManager.SoftDelete(extractPath, file.FullName);
|
_fsManager.SoftDelete(extractPath, file.FullName);
|
||||||
file.ExtractToFile(targetFile, true);
|
file.ExtractToFile(targetFile, true);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
//zip.ExtractToDirectory(extractPath); //throws exceptions sometimes?
|
//zip.ExtractToDirectory(extractPath); //throws exceptions sometimes?
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user