From b4f89b02d0108385f86511db04b23e4c304e1c57 Mon Sep 17 00:00:00 2001 From: Joshua Navarro Date: Sun, 6 Jan 2019 09:24:03 -0800 Subject: [PATCH] Fixed issue with SaveManager tring to delete files when they don't exist. --- GeneralMods/SaveAnywhere/Framework/SaveManager.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/GeneralMods/SaveAnywhere/Framework/SaveManager.cs b/GeneralMods/SaveAnywhere/Framework/SaveManager.cs index 02bab335..a26bc946 100644 --- a/GeneralMods/SaveAnywhere/Framework/SaveManager.cs +++ b/GeneralMods/SaveAnywhere/Framework/SaveManager.cs @@ -80,7 +80,10 @@ namespace Omegasis.SaveAnywhere.Framework /// Clear saved data. public void ClearData() { - File.Delete(Path.Combine(this.Helper.DirectoryPath, this.RelativeDataPath)); + if (File.Exists(Path.Combine(this.Helper.DirectoryPath, this.RelativeDataPath))) + { + File.Delete(Path.Combine(this.Helper.DirectoryPath, this.RelativeDataPath)); + } this.RemoveLegacyDataForThisPlayer(); }