Compare commits
1 Commits
Author | SHA1 | Date | |
---|---|---|---|
![]() |
2860dda41b |
@@ -68,8 +68,15 @@ namespace Torch.Managers
|
|||||||
if (File.Exists(tempFilePath))
|
if (File.Exists(tempFilePath))
|
||||||
File.Delete(tempFilePath);
|
File.Delete(tempFilePath);
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
File.Move(source, tempFilePath);
|
File.Move(source, tempFilePath);
|
||||||
}
|
}
|
||||||
|
catch (UnauthorizedAccessException)
|
||||||
|
{
|
||||||
|
// ignore
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -109,8 +109,15 @@ namespace Torch.Managers
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
_fsManager.SoftDelete(extractPath, file.FullName);
|
_fsManager.SoftDelete(extractPath, file.FullName);
|
||||||
|
try
|
||||||
|
{
|
||||||
file.ExtractToFile(targetFile, true);
|
file.ExtractToFile(targetFile, true);
|
||||||
}
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
_log.Warn(e, "unable to extract {0}", targetFile);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//zip.ExtractToDirectory(extractPath); //throws exceptions sometimes?
|
//zip.ExtractToDirectory(extractPath); //throws exceptions sometimes?
|
||||||
|
Reference in New Issue
Block a user