mirror of
https://github.com/bloxstraplabs/bloxstrap.git
synced 2025-04-21 10:01:27 -07:00
Catch exceptions when trying to delete a package
This commit is contained in:
parent
a9b3d43ab2
commit
af14c19334
@ -847,8 +847,17 @@ namespace Bloxstrap
|
||||
if (!_versionPackageManifest.Exists(package => filename.Contains(package.Signature)))
|
||||
{
|
||||
App.Logger.WriteLine(LOG_IDENT, $"Deleting unused package {filename}");
|
||||
|
||||
try
|
||||
{
|
||||
File.Delete(filename);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
App.Logger.WriteLine(LOG_IDENT, $"Failed to delete {filename}!");
|
||||
App.Logger.WriteException(LOG_IDENT, ex);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
string oldVersionFolder = Path.Combine(Paths.Versions, App.State.Prop.VersionGuid);
|
||||
|
Loading…
Reference in New Issue
Block a user