Another attempt at fixing the disappearing estate_settings.xml file.
parent
71f94d8421
commit
b521e5d219
|
@ -59,6 +59,8 @@ namespace OpenSim.Framework.Configuration
|
||||||
throw new Exception("Error: Invalid .xml File. <Root> first child should be <Config>");
|
throw new Exception("Error: Invalid .xml File. <Root> first child should be <Config>");
|
||||||
}
|
}
|
||||||
public void LoadData()
|
public void LoadData()
|
||||||
|
{
|
||||||
|
lock (this)
|
||||||
{
|
{
|
||||||
doc = new XmlDocument();
|
doc = new XmlDocument();
|
||||||
if (File.Exists(fileName))
|
if (File.Exists(fileName))
|
||||||
|
@ -84,6 +86,7 @@ namespace OpenSim.Framework.Configuration
|
||||||
this.Commit();
|
this.Commit();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public void LoadDataFromString(string data)
|
public void LoadDataFromString(string data)
|
||||||
{
|
{
|
||||||
|
@ -124,12 +127,8 @@ namespace OpenSim.Framework.Configuration
|
||||||
{
|
{
|
||||||
Directory.CreateDirectory(Util.configDir());
|
Directory.CreateDirectory(Util.configDir());
|
||||||
}
|
}
|
||||||
|
|
||||||
lock(this)
|
|
||||||
{
|
|
||||||
doc.Save(fileName);
|
doc.Save(fileName);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
public void Close()
|
public void Close()
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue