Skip to content

Commit

Permalink
fix #1792
Browse files Browse the repository at this point in the history
  • Loading branch information
Lightczx committed Jul 6, 2024
1 parent 72a1ec2 commit d3fbf35
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,15 @@ public void Restore(string destination)
{
string serverCacheFolder = runtimeOptions.GetDataFolderServerCacheFolder();
string source = Path.Combine(serverCacheFolder, ConfigurationFileName);

if (File.Exists(source))
{
string? directory = Path.GetDirectoryName(destination);
if (string.IsNullOrEmpty(directory) || !Directory.Exists(directory))
{
return;
}

File.Copy(source, destination, true);
}
}
Expand Down

0 comments on commit d3fbf35

Please sign in to comment.