mirror of
https://github.com/bloxstraplabs/bloxstrap.git
synced 2025-04-19 00:51:30 -07:00
ability to disable package cleanup
This commit is contained in:
parent
9d356b0b71
commit
9a90d8935a
@ -930,20 +930,23 @@ namespace Bloxstrap
|
|||||||
allPackageHashes.AddRange(App.State.Prop.Player.PackageHashes.Values);
|
allPackageHashes.AddRange(App.State.Prop.Player.PackageHashes.Values);
|
||||||
allPackageHashes.AddRange(App.State.Prop.Studio.PackageHashes.Values);
|
allPackageHashes.AddRange(App.State.Prop.Studio.PackageHashes.Values);
|
||||||
|
|
||||||
foreach (string hash in cachedPackageHashes)
|
if (!App.Settings.Prop.DebugDisableVersionPackageCleanup)
|
||||||
{
|
{
|
||||||
if (!allPackageHashes.Contains(hash))
|
foreach (string hash in cachedPackageHashes)
|
||||||
{
|
{
|
||||||
App.Logger.WriteLine(LOG_IDENT, $"Deleting unused package {hash}");
|
if (!allPackageHashes.Contains(hash))
|
||||||
|
|
||||||
try
|
|
||||||
{
|
{
|
||||||
File.Delete(Path.Combine(Paths.Downloads, hash));
|
App.Logger.WriteLine(LOG_IDENT, $"Deleting unused package {hash}");
|
||||||
}
|
|
||||||
catch (Exception ex)
|
try
|
||||||
{
|
{
|
||||||
App.Logger.WriteLine(LOG_IDENT, $"Failed to delete {hash}!");
|
File.Delete(Path.Combine(Paths.Downloads, hash));
|
||||||
App.Logger.WriteException(LOG_IDENT, ex);
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
App.Logger.WriteLine(LOG_IDENT, $"Failed to delete {hash}!");
|
||||||
|
App.Logger.WriteException(LOG_IDENT, ex);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -17,6 +17,7 @@ namespace Bloxstrap.Models.Persistable
|
|||||||
public bool UseFastFlagManager { get; set; } = true;
|
public bool UseFastFlagManager { get; set; } = true;
|
||||||
public bool WPFSoftwareRender { get; set; } = false;
|
public bool WPFSoftwareRender { get; set; } = false;
|
||||||
public bool EnableAnalytics { get; set; } = true;
|
public bool EnableAnalytics { get; set; } = true;
|
||||||
|
public bool DebugDisableVersionPackageCleanup { get; set; } = false;
|
||||||
public string? SelectedCustomTheme { get; set; } = null;
|
public string? SelectedCustomTheme { get; set; } = null;
|
||||||
|
|
||||||
// integration configuration
|
// integration configuration
|
||||||
|
Loading…
Reference in New Issue
Block a user