mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-05 10:46:33 +02:00
fix for thread prevent process being closed (#21311)
This commit is contained in:
committed by
GitHub
parent
460f242967
commit
1ff5fa8794
@@ -60,7 +60,7 @@ namespace Hosts
|
|||||||
|
|
||||||
UnhandledException += App_UnhandledException;
|
UnhandledException += App_UnhandledException;
|
||||||
|
|
||||||
new Thread(() =>
|
var cleanupBackupThread = new Thread(() =>
|
||||||
{
|
{
|
||||||
// Delete old backups only if running elevated
|
// Delete old backups only if running elevated
|
||||||
if (!GetService<IElevationHelper>().IsElevated)
|
if (!GetService<IElevationHelper>().IsElevated)
|
||||||
@@ -76,7 +76,10 @@ namespace Hosts
|
|||||||
{
|
{
|
||||||
Logger.LogError("Failed to delete backup", ex);
|
Logger.LogError("Failed to delete backup", ex);
|
||||||
}
|
}
|
||||||
}).Start();
|
});
|
||||||
|
|
||||||
|
cleanupBackupThread.IsBackground = true;
|
||||||
|
cleanupBackupThread.Start();
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void OnLaunched(LaunchActivatedEventArgs args)
|
protected override void OnLaunched(LaunchActivatedEventArgs args)
|
||||||
|
|||||||
Reference in New Issue
Block a user