mirror of
https://github.com/microsoft/PowerToys.git
synced 2025-12-16 19:57:57 +01:00
[Settings]Fix backup and restore "no backup found" when they do exist (#21870)
This commit is contained in:
@@ -432,10 +432,15 @@ namespace Microsoft.PowerToys.Settings.UI.Library
|
||||
var tempPath = Path.GetTempPath();
|
||||
|
||||
var fullBackupDir = Path.Combine(tempPath, "PowerToys_settings_" + latestFile.ToString(CultureInfo.InvariantCulture));
|
||||
if (!Directory.Exists(fullBackupDir))
|
||||
|
||||
lock (backupSettingsInternalLock)
|
||||
{
|
||||
if (!Directory.Exists(fullBackupDir) || !File.Exists(Path.Combine(fullBackupDir, "manifest.json")))
|
||||
{
|
||||
TryDeleteDirectory(fullBackupDir);
|
||||
ZipFile.ExtractToDirectory(settingsBackupFiles[latestFile], fullBackupDir);
|
||||
}
|
||||
}
|
||||
|
||||
ThreadPool.QueueUserWorkItem((x) =>
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user