Like the assembly and text files, only write the c#-lsl linemap in XEngine.SetXMLState() if the trust binaries flag is set.
This doesn't affect other locations where the map is written, such as on script compilation.0.7.3-extended
parent
7bd1601a3f
commit
981c7d63a0
|
@ -1835,28 +1835,6 @@ namespace OpenSim.Region.ScriptEngine.XEngine
|
|||
m_log.ErrorFormat("[XEngine]: Error whilst writing .text file {0}, {1}", textpath, ex.Message);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
string statepath = Path.Combine(m_ScriptEnginesPath, World.RegionInfo.RegionID.ToString());
|
||||
statepath = Path.Combine(statepath, itemID.ToString() + ".state");
|
||||
|
||||
try
|
||||
{
|
||||
using (FileStream sfs = File.Create(statepath))
|
||||
{
|
||||
using (StreamWriter ssw = new StreamWriter(sfs))
|
||||
{
|
||||
// m_log.DebugFormat("[XEngine]: Writing state file {0}", statepath);
|
||||
|
||||
ssw.Write(stateE.OuterXml);
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (IOException ex)
|
||||
{
|
||||
// if there already exists a file at that location, it may be locked.
|
||||
m_log.ErrorFormat("[XEngine]: Error whilst writing state file {0}, {1}", statepath, ex.Message);
|
||||
}
|
||||
|
||||
XmlNodeList mapL = rootE.GetElementsByTagName("LineMap");
|
||||
if (mapL.Count > 0)
|
||||
|
@ -1884,6 +1862,28 @@ namespace OpenSim.Region.ScriptEngine.XEngine
|
|||
m_log.ErrorFormat("[XEngine]: Linemap file {0} already exists! {1}", mappath, ex.Message);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
string statepath = Path.Combine(m_ScriptEnginesPath, World.RegionInfo.RegionID.ToString());
|
||||
statepath = Path.Combine(statepath, itemID.ToString() + ".state");
|
||||
|
||||
try
|
||||
{
|
||||
using (FileStream sfs = File.Create(statepath))
|
||||
{
|
||||
using (StreamWriter ssw = new StreamWriter(sfs))
|
||||
{
|
||||
// m_log.DebugFormat("[XEngine]: Writing state file {0}", statepath);
|
||||
|
||||
ssw.Write(stateE.OuterXml);
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (IOException ex)
|
||||
{
|
||||
// if there already exists a file at that location, it may be locked.
|
||||
m_log.ErrorFormat("[XEngine]: Error whilst writing state file {0}, {1}", statepath, ex.Message);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue