Skip to content

Commit 1b38826

Browse files
committed
Fix for a cache rebuild error when attempting to copy over an existing file.
1 parent a47466a commit 1b38826

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

xivModdingFramework/Cache/XivCache.cs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -368,7 +368,14 @@ private static void CreateCache()
368368
if(backupDate > currentDate)
369369
{
370370
// Our backup is newer, copy it through.
371-
File.Copy(backupFile, _rootCachePath.FullName);
371+
try
372+
{
373+
File.Delete(_rootCachePath.FullName);
374+
File.Copy(backupFile, _rootCachePath.FullName);
375+
} catch
376+
{
377+
// No-op, non-critical.
378+
}
372379
}
373380
}
374381
}

0 commit comments

Comments
 (0)