mirror of
https://github.com/bloxstraplabs/bloxstrap.git
synced 2025-04-21 10:01:27 -07:00
delete latest version directory if it exists before update
This commit is contained in:
parent
f768f0a1bb
commit
a91742fe51
@ -706,6 +706,19 @@ namespace Bloxstrap
|
|||||||
|
|
||||||
_isInstalling = true;
|
_isInstalling = true;
|
||||||
|
|
||||||
|
if (Directory.Exists(_latestVersionDirectory))
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
Directory.Delete(_latestVersionDirectory, true);
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
App.Logger.WriteLine(LOG_IDENT, "Failed to delete the latest version directory");
|
||||||
|
App.Logger.WriteException(LOG_IDENT, ex);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
Directory.CreateDirectory(_latestVersionDirectory);
|
Directory.CreateDirectory(_latestVersionDirectory);
|
||||||
|
|
||||||
var cachedPackageHashes = Directory.GetFiles(Paths.Downloads).Select(x => Path.GetFileName(x));
|
var cachedPackageHashes = Directory.GetFiles(Paths.Downloads).Select(x => Path.GetFileName(x));
|
||||||
|
Loading…
Reference in New Issue
Block a user