v0.14.9.1

This commit is contained in:
Juan Pablo Arce
2021-09-09 07:42:25 -03:00
parent b18137978f
commit dacbeb1cfa
10 changed files with 183 additions and 52 deletions
@@ -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;