Skip to content

Commit bc21b95

Browse files
committed
- Fix crash for TTMP1 files (they don't have valid parsable JSON .mpls)
1 parent 6552787 commit bc21b95

File tree

1 file changed

+7
-2
lines changed
  • xivModdingFramework/Mods/FileTypes

1 file changed

+7
-2
lines changed

xivModdingFramework/Mods/FileTypes/TTMP.cs

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -436,8 +436,13 @@ public static string GetVersion(DirectoryInfo modPackDirectory)
436436
using (var streamReader = new StreamReader(entry.Open()))
437437
{
438438
var jsonString = streamReader.ReadToEnd();
439-
440-
modPackJson = JsonConvert.DeserializeObject<ModPackJson>(jsonString);
439+
try
440+
{
441+
modPackJson = JsonConvert.DeserializeObject<ModPackJson>(jsonString);
442+
} catch(Exception ex)
443+
{
444+
return "1.0";
445+
}
441446
}
442447
}
443448
}

0 commit comments

Comments
 (0)