diff options
Diffstat (limited to 'OpenSim/Region')
-rw-r--r-- | OpenSim/Region/ScriptEngine/Shared/CodeTools/Compiler.cs | 30 |
1 files changed, 4 insertions, 26 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/CodeTools/Compiler.cs b/OpenSim/Region/ScriptEngine/Shared/CodeTools/Compiler.cs index 5988539..f874de2 100644 --- a/OpenSim/Region/ScriptEngine/Shared/CodeTools/Compiler.cs +++ b/OpenSim/Region/ScriptEngine/Shared/CodeTools/Compiler.cs | |||
@@ -120,7 +120,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.CodeTools | |||
120 | if (in_startup) | 120 | if (in_startup) |
121 | { | 121 | { |
122 | in_startup = false; | 122 | in_startup = false; |
123 | CreateScriptsDirectory(); | 123 | CheckOrCreateScriptsDirectory(); |
124 | 124 | ||
125 | // First time we start? Delete old files | 125 | // First time we start? Delete old files |
126 | if (DeleteScriptsOnStartup) | 126 | if (DeleteScriptsOnStartup) |
@@ -189,13 +189,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.CodeTools | |||
189 | } | 189 | } |
190 | 190 | ||
191 | // We now have an allow-list, a mapping list, and a default language | 191 | // We now have an allow-list, a mapping list, and a default language |
192 | |||
193 | } | 192 | } |
194 | 193 | ||
195 | /// <summary> | 194 | /// <summary> |
196 | /// Create the directory where compiled scripts are stored. | 195 | /// Create the directory where compiled scripts are stored if it does not already exist. |
197 | /// </summary> | 196 | /// </summary> |
198 | private void CreateScriptsDirectory() | 197 | private void CheckOrCreateScriptsDirectory() |
199 | { | 198 | { |
200 | if (!Directory.Exists(ScriptEnginesPath)) | 199 | if (!Directory.Exists(ScriptEnginesPath)) |
201 | { | 200 | { |
@@ -302,28 +301,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.CodeTools | |||
302 | 301 | ||
303 | assembly = GetCompilerOutput(asset); | 302 | assembly = GetCompilerOutput(asset); |
304 | 303 | ||
305 | if (!Directory.Exists(ScriptEnginesPath)) | 304 | CheckOrCreateScriptsDirectory(); |
306 | { | ||
307 | try | ||
308 | { | ||
309 | Directory.CreateDirectory(ScriptEnginesPath); | ||
310 | } | ||
311 | catch (Exception) | ||
312 | { | ||
313 | } | ||
314 | } | ||
315 | |||
316 | if (!Directory.Exists(Path.Combine(ScriptEnginesPath, | ||
317 | m_scriptEngine.World.RegionInfo.RegionID.ToString()))) | ||
318 | { | ||
319 | try | ||
320 | { | ||
321 | Directory.CreateDirectory(ScriptEnginesPath); | ||
322 | } | ||
323 | catch (Exception) | ||
324 | { | ||
325 | } | ||
326 | } | ||
327 | 305 | ||
328 | // Don't recompile if we already have it | 306 | // Don't recompile if we already have it |
329 | // Performing 3 file exists tests for every script can still be slow | 307 | // Performing 3 file exists tests for every script can still be slow |