From 366c2f7673a33732ce14471c3355f5931c8f54e0 Mon Sep 17 00:00:00 2001 From: Miepee Date: Sat, 14 Jan 2023 20:49:34 +0100 Subject: [PATCH] Fix save transferring potentially failing if no save folders exist --- AM2RLauncher/AM2RLauncher/MainForm/MainForm.Events.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/AM2RLauncher/AM2RLauncher/MainForm/MainForm.Events.cs b/AM2RLauncher/AM2RLauncher/MainForm/MainForm.Events.cs index d3cdfca..e38d0f0 100644 --- a/AM2RLauncher/AM2RLauncher/MainForm/MainForm.Events.cs +++ b/AM2RLauncher/AM2RLauncher/MainForm/MainForm.Events.cs @@ -152,7 +152,7 @@ public partial class MainForm : Form string oldSavePath = profile.SaveLocation.Replace("~", oldHomePath); string newSavePath = profile.SaveLocation.Replace("~", newHomePath); - if (Directory.Exists(newSavePath)) continue; + if (Directory.Exists(newSavePath) || !Directory.Exists(oldSavePath)) continue; log.Info($"Transfering save data for {profile.Name} from {oldSavePath} to {newSavePath} ..."); HelperMethods.DirectoryCopy(oldSavePath, newSavePath);