fix: Ensure backup folder exists before rolling up directories too (#802)
This commit is contained in:
parent
b5799c33af
commit
f1a4195543
1 changed files with 2 additions and 1 deletions
|
|
@ -86,7 +86,7 @@ namespace Server.Saves
|
|||
}
|
||||
|
||||
var backupPath = Path.Combine(BackupPath, Utility.GetTimeStamp());
|
||||
AssemblyHandler.EnsureDirectory(backupPath);
|
||||
AssemblyHandler.EnsureDirectory(BackupPath);
|
||||
Directory.Move(args.OldSavePath, backupPath);
|
||||
|
||||
logger.Information($"Created backup at {backupPath}");
|
||||
|
|
@ -262,6 +262,7 @@ namespace Server.Saves
|
|||
|
||||
var stopWatch = new Stopwatch();
|
||||
stopWatch.Start();
|
||||
AssemblyHandler.EnsureDirectory(BackupPath);
|
||||
var allFolders = Directory.EnumerateDirectories(BackupPath, "????-??-??-??-??-??");
|
||||
|
||||
var rangeEnd = archivePeriod switch
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue