mirror of
https://github.com/Flow-Launcher/Flow.Launcher.git
synced 2026-03-11 08:54:32 +00:00
Fix Error of loading backup when original file doesn't exists
This commit is contained in:
parent
7fc704558d
commit
7e350b64ba
1 changed files with 5 additions and 1 deletions
|
|
@ -77,7 +77,11 @@ namespace Flow.Launcher.Infrastructure.Storage
|
|||
if (data != null)
|
||||
{
|
||||
Log.Info($"|JsonStorage.Load|Failed to load settings.json, {BackupFilePath} restored successfully");
|
||||
File.Replace(BackupFilePath, FilePath, null);
|
||||
|
||||
if(File.Exists(FilePath)
|
||||
File.Replace(BackupFilePath, FilePath, null);
|
||||
else
|
||||
File.Copy(BackupFilePath, FilePath);
|
||||
|
||||
return data;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue