mirror of
https://github.com/bloxstraplabs/bloxstrap.git
synced 2025-04-21 10:01:27 -07:00
Catch exceptions when deleting files/folders
This commit is contained in:
parent
b22d72a1b8
commit
b6de3645b7
@ -920,8 +920,17 @@ namespace Bloxstrap
|
|||||||
continue;
|
continue;
|
||||||
|
|
||||||
App.Logger.WriteLine(LOG_IDENT, $"Removing old version folder for {dir.Name}");
|
App.Logger.WriteLine(LOG_IDENT, $"Removing old version folder for {dir.Name}");
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
dir.Delete(true);
|
dir.Delete(true);
|
||||||
}
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
App.Logger.WriteLine(LOG_IDENT, "Failed to delete version folder!");
|
||||||
|
App.Logger.WriteException(LOG_IDENT, ex);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -64,8 +64,17 @@
|
|||||||
continue;
|
continue;
|
||||||
|
|
||||||
WriteLine(LOG_IDENT, $"Cleaning up old log file '{log.Name}'");
|
WriteLine(LOG_IDENT, $"Cleaning up old log file '{log.Name}'");
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
log.Delete();
|
log.Delete();
|
||||||
}
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
WriteLine(LOG_IDENT, "Failed to delete log!");
|
||||||
|
WriteException(LOG_IDENT, ex);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user