(99feac023) Unstable 0.9.704.0
This commit is contained in:
@@ -173,6 +173,7 @@ namespace Barotrauma
|
||||
XDocument doc = OpenFile(filePath);
|
||||
StartHashDocTask(doc);
|
||||
hashTask.Wait();
|
||||
hashTask = null;
|
||||
}
|
||||
|
||||
return hash;
|
||||
@@ -343,7 +344,10 @@ namespace Barotrauma
|
||||
public Submarine(string filePath, string hash = "", bool tryLoad = true) : base(null)
|
||||
{
|
||||
this.filePath = filePath;
|
||||
LastModifiedTime = File.GetLastWriteTime(filePath);
|
||||
if (!string.IsNullOrEmpty(filePath) && File.Exists(filePath))
|
||||
{
|
||||
LastModifiedTime = File.GetLastWriteTime(filePath);
|
||||
}
|
||||
try
|
||||
{
|
||||
name = displayName = Path.GetFileNameWithoutExtension(filePath);
|
||||
@@ -1631,6 +1635,10 @@ namespace Barotrauma
|
||||
return false;
|
||||
}
|
||||
|
||||
hash = null;
|
||||
hashTask = null;
|
||||
Md5Hash.RemoveFromCache(filePath);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user