summaryrefslogtreecommitdiff
path: root/src/SMAPI/Constants.cs
diff options
context:
space:
mode:
authorJesse Plamondon-Willard <Pathoschild@users.noreply.github.com>2021-08-01 13:11:51 -0400
committerJesse Plamondon-Willard <Pathoschild@users.noreply.github.com>2021-08-01 13:11:51 -0400
commit5b31be76dd90711ff475341de8dfdb6e1f50b98a (patch)
treee120bc62af72e94e8e924ba124382d0c6f9304de /src/SMAPI/Constants.cs
parent8f96a97f070d654764de3b138678d8f62707f485 (diff)
parentd688cdf8c3c852d4b11cdd046d67c4b35443cc95 (diff)
downloadSMAPI-5b31be76dd90711ff475341de8dfdb6e1f50b98a.tar.gz
SMAPI-5b31be76dd90711ff475341de8dfdb6e1f50b98a.tar.bz2
SMAPI-5b31be76dd90711ff475341de8dfdb6e1f50b98a.zip
Merge branch 'develop' into stable
Diffstat (limited to 'src/SMAPI/Constants.cs')
-rw-r--r--src/SMAPI/Constants.cs15
1 files changed, 11 insertions, 4 deletions
diff --git a/src/SMAPI/Constants.cs b/src/SMAPI/Constants.cs
index 9e93551c..3877e17a 100644
--- a/src/SMAPI/Constants.cs
+++ b/src/SMAPI/Constants.cs
@@ -61,7 +61,7 @@ namespace StardewModdingAPI
internal static int? LogScreenId { get; set; }
/// <summary>SMAPI's current raw semantic version.</summary>
- internal static string RawApiVersion = "3.11.0";
+ internal static string RawApiVersion = "3.12.0";
}
/// <summary>Contains SMAPI's constants and assumptions.</summary>
@@ -351,9 +351,16 @@ namespace StardewModdingAPI
DirectoryInfo folder = null;
foreach (string saveName in new[] { rawSaveName, new string(rawSaveName.Where(char.IsLetterOrDigit).ToArray()) })
{
- folder = new DirectoryInfo(Path.Combine(Constants.SavesPath, $"{saveName}_{saveID}"));
- if (folder.Exists)
- return folder;
+ try
+ {
+ folder = new DirectoryInfo(Path.Combine(Constants.SavesPath, $"{saveName}_{saveID}"));
+ if (folder.Exists)
+ return folder;
+ }
+ catch (ArgumentException)
+ {
+ // ignore invalid path
+ }
}
// if save doesn't exist yet, return the default one we expect to be created