SMAPI - Stardew Modding API

SMAPI - Stardew Modding API

971k Downloads

System.IO.DirectoryNotFoundException when using ReadJsonFile in ModHelper class

mytigio opened this issue ยท 1 comments

commented

Hello,

So, a quick fix, ReadJsonFile in the ModHelper classes throws an uncaught DirectoryNotFoundException if using a save-specific config file and the save directory does not yet exist.

If the config file doesn't exist, it returns null, but if the directory does not exist it throws the exception.

I'll submit a pull request with a quick addition to the catch block to return null under these conditions as well.

commented

Fixed via pull request #213. Thanks!