mirror of
https://github.com/n00mkrad/flowframes.git
synced 2025-12-23 03:39:26 +01:00
Cleanup RIFE crash dumps
This commit is contained in:
@@ -288,8 +288,10 @@ namespace Flowframes
|
|||||||
public static async Task Cleanup(bool ignoreKeepSetting = false, int retriesLeft = 3, bool isRetry = false)
|
public static async Task Cleanup(bool ignoreKeepSetting = false, int retriesLeft = 3, bool isRetry = false)
|
||||||
{
|
{
|
||||||
if ((!ignoreKeepSetting && Config.GetBool(Config.Key.keepTempFolder)) || !Program.busy) return;
|
if ((!ignoreKeepSetting && Config.GetBool(Config.Key.keepTempFolder)) || !Program.busy) return;
|
||||||
|
|
||||||
if (!isRetry)
|
if (!isRetry)
|
||||||
Logger.Log("Deleting temporary files...");
|
Logger.Log("Deleting temporary files...");
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
await Task.Run(async () => { Directory.Delete(currentSettings.tempFolder, true); });
|
await Task.Run(async () => { Directory.Delete(currentSettings.tempFolder, true); });
|
||||||
|
|||||||
@@ -122,6 +122,7 @@ namespace Flowframes
|
|||||||
}
|
}
|
||||||
|
|
||||||
IoUtils.GetFilesSorted(Paths.GetPkgPath(), false, "*.log*").ToList().ForEach(x => IoUtils.TryDeleteIfExists(x));
|
IoUtils.GetFilesSorted(Paths.GetPkgPath(), false, "*.log*").ToList().ForEach(x => IoUtils.TryDeleteIfExists(x));
|
||||||
|
IoUtils.GetFilesSorted(Path.Combine(Environment.ExpandEnvironmentVariables("%LOCALAPPDATA%"), "CrashDumps"), false, "rife*.exe.*.dmp").ToList().ForEach(x => IoUtils.TryDeleteIfExists(x));
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user