diff options
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/ScriptEngine/YEngine/XMRInstMisc.cs | 36 |
1 files changed, 11 insertions, 25 deletions
diff --git a/OpenSim/Region/ScriptEngine/YEngine/XMRInstMisc.cs b/OpenSim/Region/ScriptEngine/YEngine/XMRInstMisc.cs index 8f020ce..0af3d37 100644 --- a/OpenSim/Region/ScriptEngine/YEngine/XMRInstMisc.cs +++ b/OpenSim/Region/ScriptEngine/YEngine/XMRInstMisc.cs | |||
@@ -74,14 +74,10 @@ namespace OpenSim.Region.ScriptEngine.Yengine | |||
74 | */ | 74 | */ |
75 | public void Dispose() | 75 | public void Dispose() |
76 | { | 76 | { |
77 | /* | 77 | // Tell script stop executing next time it calls CheckRun(). |
78 | * Tell script stop executing next time it calls CheckRun(). | ||
79 | */ | ||
80 | suspendOnCheckRunHold = true; | 78 | suspendOnCheckRunHold = true; |
81 | 79 | ||
82 | /* | 80 | // Don't send us any more events. |
83 | * Don't send us any more events. | ||
84 | */ | ||
85 | lock(m_RunLock) | 81 | lock(m_RunLock) |
86 | { | 82 | { |
87 | if(m_Part != null) | 83 | if(m_Part != null) |
@@ -92,10 +88,8 @@ namespace OpenSim.Region.ScriptEngine.Yengine | |||
92 | } | 88 | } |
93 | } | 89 | } |
94 | 90 | ||
95 | /* | 91 | // Let script methods get garbage collected if no one else is using |
96 | * Let script methods get garbage collected if no one else is using | 92 | // them. |
97 | * them. | ||
98 | */ | ||
99 | DecObjCodeRefCount(); | 93 | DecObjCodeRefCount(); |
100 | } | 94 | } |
101 | 95 | ||
@@ -244,26 +238,20 @@ namespace OpenSim.Region.ScriptEngine.Yengine | |||
244 | 238 | ||
245 | public static string GetScriptFileName(string scriptBasePath, string filename) | 239 | public static string GetScriptFileName(string scriptBasePath, string filename) |
246 | { | 240 | { |
247 | /* | 241 | // Get old path, ie, all files lumped in a single huge directory. |
248 | * Get old path, ie, all files lumped in a single huge directory. | ||
249 | */ | ||
250 | string oldPath = Path.Combine(scriptBasePath, filename); | 242 | string oldPath = Path.Combine(scriptBasePath, filename); |
251 | 243 | ||
252 | /* | 244 | // Get new path, ie, files split up based on first 2 chars of name. |
253 | * Get new path, ie, files split up based on first 2 chars of name. | 245 | // string subdir = filename.Substring (0, 2); |
254 | */ | 246 | // filename = filename.Substring (2); |
255 | // string subdir = filename.Substring (0, 2); | ||
256 | // filename = filename.Substring (2); | ||
257 | string subdir = filename.Substring(0, 1); | 247 | string subdir = filename.Substring(0, 1); |
258 | filename = filename.Substring(1); | 248 | filename = filename.Substring(1); |
259 | scriptBasePath = Path.Combine(scriptBasePath, subdir); | 249 | scriptBasePath = Path.Combine(scriptBasePath, subdir); |
260 | Directory.CreateDirectory(scriptBasePath); | 250 | Directory.CreateDirectory(scriptBasePath); |
261 | string newPath = Path.Combine(scriptBasePath, filename); | 251 | string newPath = Path.Combine(scriptBasePath, filename); |
262 | 252 | ||
263 | /* | 253 | // If file exists only in old location, move to new location. |
264 | * If file exists only in old location, move to new location. | 254 | // If file exists in both locations, delete old location. |
265 | * If file exists in both locations, delete old location. | ||
266 | */ | ||
267 | if(File.Exists(oldPath)) | 255 | if(File.Exists(oldPath)) |
268 | { | 256 | { |
269 | if(File.Exists(newPath)) | 257 | if(File.Exists(newPath)) |
@@ -276,9 +264,7 @@ namespace OpenSim.Region.ScriptEngine.Yengine | |||
276 | } | 264 | } |
277 | } | 265 | } |
278 | 266 | ||
279 | /* | 267 | // Always return new location. |
280 | * Always return new location. | ||
281 | */ | ||
282 | return newPath; | 268 | return newPath; |
283 | } | 269 | } |
284 | 270 | ||