From f8314441d93212b2b52297bb8906c1b459fa8cef Mon Sep 17 00:00:00 2001 From: Chris-Is-Awesome <34765277+Chris-Is-Awesome@users.noreply.github.com> Date: Thu, 25 Jul 2024 14:52:23 -0700 Subject: [PATCH] Fix bug with being unable to duplicate vanilla files --- Code/APMenuStuff.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Code/APMenuStuff.cs b/Code/APMenuStuff.cs index 7deea7e..34f1610 100644 --- a/Code/APMenuStuff.cs +++ b/Code/APMenuStuff.cs @@ -152,7 +152,10 @@ public void SaveAPDataToFile(APFileData apFileData) public void DuplicateAPDataFile() { - File.Copy(GetAPDataFilePath(false), GetAPDataFilePath(true), true); + string path = GetAPDataFilePath(false); + + if (File.Exists(path)) + File.Copy(path, GetAPDataFilePath(true), true); } public void DeleteAPDataFile()