Skip to content

Commit c4b3c25

Browse files
committed
re-add unstaged error handling
1 parent 5d597ab commit c4b3c25

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

xivModdingFramework/Cache/XivCache.cs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -481,13 +481,15 @@ private static async Task MigrateCache(Version lastCacheVersion) {
481481
int uncompressedSize = -1;
482482
long seekTo = Dat.OffsetCorrection(datNum, mod.data.modOffset) + 8;
483483

484-
// Seek to and read the uncompressed texture size
484+
// Seek to and read the uncompressed texture size catching any exceptions
485+
// because we handle further processing with the initial value of -1
486+
try
485487
{
486488
using var reader = new BinaryReader(File.OpenRead(datPath));
487489
reader.BaseStream.Position = seekTo;
488490

489491
uncompressedSize = reader.ReadInt32();
490-
}
492+
} catch (Exception) {}
491493

492494
// If we read an uncompressed size, seek to the same position and write the fixed uncompressed texture size
493495
if (uncompressedSize != -1)

0 commit comments

Comments
 (0)