Skip to content

Commit 40fbae0

Browse files
committed
Chore: Cleanup
1 parent 493d62f commit 40fbae0

File tree

1 file changed

+3
-8
lines changed

1 file changed

+3
-8
lines changed

Source/NETworkManager.Settings/SettingsManager.cs

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -178,17 +178,12 @@ public static void Load()
178178
Save();
179179

180180
// Create a backup of the legacy XML file and delete the original
181-
Directory.CreateDirectory(GetSettingsBackupFolderLocation());
182-
183-
var backupFilePath = Path.Combine(GetSettingsBackupFolderLocation(),
181+
Backup(legacyFilePath,
182+
GetSettingsBackupFolderLocation(),
184183
$"{TimestampHelper.GetTimestamp()}_{GetLegacySettingsFileName()}");
185-
186-
File.Copy(legacyFilePath, backupFilePath, true);
187-
184+
188185
File.Delete(legacyFilePath);
189186

190-
Log.Info($"Legacy XML settings file backed up to: {backupFilePath}");
191-
192187
Log.Info("Settings migration from XML to JSON completed successfully.");
193188

194189
return;

0 commit comments

Comments
 (0)