v0.14.9.1
This commit is contained in:
@@ -743,7 +743,10 @@ namespace Barotrauma
|
||||
try
|
||||
{
|
||||
stream.Position = 0;
|
||||
doc = XDocument.Load(stream); //ToolBox.TryLoadXml(file);
|
||||
using (var reader = XMLExtensions.CreateReader(stream))
|
||||
{
|
||||
doc = XDocument.Load(reader);
|
||||
}
|
||||
stream.Close();
|
||||
stream.Dispose();
|
||||
}
|
||||
@@ -760,9 +763,10 @@ namespace Barotrauma
|
||||
try
|
||||
{
|
||||
ToolBox.IsProperFilenameCase(file);
|
||||
doc = XDocument.Load(file, LoadOptions.SetBaseUri);
|
||||
using var stream = File.Open(file, System.IO.FileMode.Open, System.IO.FileAccess.Read);
|
||||
using var reader = XMLExtensions.CreateReader(stream);
|
||||
doc = XDocument.Load(reader);
|
||||
}
|
||||
|
||||
catch (Exception e)
|
||||
{
|
||||
exception = e;
|
||||
|
||||
Reference in New Issue
Block a user