Fixed issue with SaveManager tring to delete files when they don't exist.

This commit is contained in:
Joshua Navarro 2019-01-06 09:24:03 -08:00
parent e3bb6582f5
commit b4f89b02d0
1 changed files with 4 additions and 1 deletions

View File

@ -79,8 +79,11 @@ namespace Omegasis.SaveAnywhere.Framework
/// <summary>Clear saved data.</summary> /// <summary>Clear saved data.</summary>
public void ClearData() public void ClearData()
{
if (File.Exists(Path.Combine(this.Helper.DirectoryPath, this.RelativeDataPath)))
{ {
File.Delete(Path.Combine(this.Helper.DirectoryPath, this.RelativeDataPath)); File.Delete(Path.Combine(this.Helper.DirectoryPath, this.RelativeDataPath));
}
this.RemoveLegacyDataForThisPlayer(); this.RemoveLegacyDataForThisPlayer();
} }