(c590657d2) Don't retry decompressing save files or loading sub files if the file doesn't exist

This commit is contained in:
Joonas Rikkonen
2019-03-26 17:10:06 +02:00
parent 93f2dfb185
commit 555d91a3d5
2 changed files with 5 additions and 5 deletions
@@ -323,7 +323,7 @@ namespace Barotrauma
for (int i = 0; i <= maxLoadRetries; i++)
{
doc = OpenFile(filePath);
if (doc != null || i == maxLoadRetries) { break; }
if (doc != null || i == maxLoadRetries || !File.Exists(filePath)) { break; }
DebugConsole.NewMessage("Opening submarine file \"" + filePath + "\" failed, retrying in 250 ms...");
Thread.Sleep(250);
}
@@ -1192,7 +1192,7 @@ namespace Barotrauma
for (int i = 0; i <= maxLoadRetries; i++)
{
doc = OpenFile(filePath);
if (doc != null || i == maxLoadRetries) { break; }
if (doc != null || i == maxLoadRetries || !File.Exists(filePath)) { break; }
DebugConsole.NewMessage("Loading the submarine \"" + Name + "\" failed, retrying in 250 ms...");
Thread.Sleep(250);
}