fix: Fixes directory copying (#1668)
This commit is contained in:
parent
00332e542d
commit
3244704ea2
4 changed files with 58 additions and 15 deletions
|
|
@ -97,7 +97,7 @@ namespace Server.Saves
|
|||
|
||||
Directory.CreateDirectory(AutomaticBackupPath);
|
||||
var backupPath = Path.Combine(AutomaticBackupPath, Utility.GetTimeStamp());
|
||||
PathUtility.MoveDirectory(args.OldSavePath, backupPath);
|
||||
PathUtility.MoveDirectoryContents(args.OldSavePath, backupPath);
|
||||
|
||||
logger.Information("Created backup at {Path}", backupPath);
|
||||
|
||||
|
|
@ -150,7 +150,7 @@ namespace Server.Saves
|
|||
Directory.Delete(savePath, true);
|
||||
var dirInfo = new DirectoryInfo(folder);
|
||||
logger.Information("Restoring backup {Directory}", dirInfo.Name);
|
||||
PathUtility.MoveDirectory(folder, savePath);
|
||||
PathUtility.MoveDirectoryContents(folder, savePath);
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue