mirror of
https://github.com/Flow-Launcher/Flow.Launcher.git
synced 2026-03-11 08:54:32 +00:00
Merge pull request #1854 from Flow-Launcher/taooceros-patch-1
Fix Error of loading backup when original file doesn't exists
This commit is contained in:
commit
d40ff120e5
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.Move(BackupFilePath, FilePath);
|
||||
|
||||
return data;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue