diff options
author | Melanie Thielker | 2009-03-24 12:18:31 +0000 |
---|---|---|
committer | Melanie Thielker | 2009-03-24 12:18:31 +0000 |
commit | c268b71f4bb87f22e2be94791349227c672ddc06 (patch) | |
tree | bb4e10e8d8586be0607e588af68e21a8f994e420 | |
parent | From: Alan Webb <alan_webb@us.ibm.com> (diff) | |
download | opensim-SC-c268b71f4bb87f22e2be94791349227c672ddc06.zip opensim-SC-c268b71f4bb87f22e2be94791349227c672ddc06.tar.gz opensim-SC-c268b71f4bb87f22e2be94791349227c672ddc06.tar.bz2 opensim-SC-c268b71f4bb87f22e2be94791349227c672ddc06.tar.xz |
Thank you, dslake, for a patch that speeds up the Delete Old Files option
in the compiler. Committed with changes.
Fixes Mantis #3325
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/ScriptEngine/Shared/CodeTools/Compiler.cs | 32 |
1 files changed, 19 insertions, 13 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/CodeTools/Compiler.cs b/OpenSim/Region/ScriptEngine/Shared/CodeTools/Compiler.cs index 6c8f3d0..42ec324 100644 --- a/OpenSim/Region/ScriptEngine/Shared/CodeTools/Compiler.cs +++ b/OpenSim/Region/ScriptEngine/Shared/CodeTools/Compiler.cs | |||
@@ -216,21 +216,27 @@ namespace OpenSim.Region.ScriptEngine.Shared.CodeTools | |||
216 | } | 216 | } |
217 | 217 | ||
218 | foreach (string file in Directory.GetFiles(Path.Combine(ScriptEnginesPath, | 218 | foreach (string file in Directory.GetFiles(Path.Combine(ScriptEnginesPath, |
219 | m_scriptEngine.World.RegionInfo.RegionID.ToString()))) | 219 | m_scriptEngine.World.RegionInfo.RegionID.ToString()),FilePrefix + "_compiled*")) |
220 | { | 220 | { |
221 | //m_log.Error("[Compiler]: FILE FOUND: " + file); | 221 | try |
222 | |||
223 | if (file.ToLower().StartsWith(FilePrefix + "_compiled_") || | ||
224 | file.ToLower().StartsWith(FilePrefix + "_source_")) | ||
225 | { | 222 | { |
226 | try | 223 | File.Delete(file); |
227 | { | 224 | } |
228 | File.Delete(file); | 225 | catch (Exception ex) |
229 | } | 226 | { |
230 | catch (Exception ex) | 227 | m_log.Error("[Compiler]: Exception trying delete old script file \"" + file + "\": " + ex.ToString()); |
231 | { | 228 | } |
232 | m_log.Error("[Compiler]: Exception trying delete old script file \"" + file + "\": " + ex.ToString()); | 229 | } |
233 | } | 230 | foreach (string file in Directory.GetFiles(Path.Combine(ScriptEnginesPath, |
231 | m_scriptEngine.World.RegionInfo.RegionID.ToString()), FilePrefix + "_source*")) | ||
232 | { | ||
233 | try | ||
234 | { | ||
235 | File.Delete(file); | ||
236 | } | ||
237 | catch (Exception ex) | ||
238 | { | ||
239 | m_log.Error("[Compiler]: Exception trying delete old script file \"" + file + "\": " + ex.ToString()); | ||
234 | } | 240 | } |
235 | } | 241 | } |
236 | } | 242 | } |