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

@ -80,7 +80,10 @@ namespace Omegasis.SaveAnywhere.Framework
/// <summary>Clear saved data.</summary> /// <summary>Clear saved data.</summary>
public void ClearData() 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(); this.RemoveLegacyDataForThisPlayer();
} }