Thank you, dslake, for a patch that speeds up the Delete Old Files option

in the compiler. Committed with changes.
Fixes Mantis #3325
0.6.5-rc1
Melanie Thielker 2009-03-24 12:18:31 +00:00
parent b5f6aa6ff2
commit c268b71f4b
1 changed files with 19 additions and 13 deletions

View File

@ -216,21 +216,27 @@ namespace OpenSim.Region.ScriptEngine.Shared.CodeTools
}
foreach (string file in Directory.GetFiles(Path.Combine(ScriptEnginesPath,
m_scriptEngine.World.RegionInfo.RegionID.ToString())))
m_scriptEngine.World.RegionInfo.RegionID.ToString()),FilePrefix + "_compiled*"))
{
//m_log.Error("[Compiler]: FILE FOUND: " + file);
if (file.ToLower().StartsWith(FilePrefix + "_compiled_") ||
file.ToLower().StartsWith(FilePrefix + "_source_"))
try
{
try
{
File.Delete(file);
}
catch (Exception ex)
{
m_log.Error("[Compiler]: Exception trying delete old script file \"" + file + "\": " + ex.ToString());
}
File.Delete(file);
}
catch (Exception ex)
{
m_log.Error("[Compiler]: Exception trying delete old script file \"" + file + "\": " + ex.ToString());
}
}
foreach (string file in Directory.GetFiles(Path.Combine(ScriptEnginesPath,
m_scriptEngine.World.RegionInfo.RegionID.ToString()), FilePrefix + "_source*"))
{
try
{
File.Delete(file);
}
catch (Exception ex)
{
m_log.Error("[Compiler]: Exception trying delete old script file \"" + file + "\": " + ex.ToString());
}
}
}