diff options
author | Justin Clark-Casey (justincc) | 2015-01-23 00:45:51 +0000 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2015-01-23 00:45:51 +0000 |
commit | 840e4405413ae312f24317435c10652c6b3a9ce3 (patch) | |
tree | 33fc1e021918e95e2f9ac1fba1db598415b920a1 | |
parent | Fix regression where the stored state of every second script in an object rez... (diff) | |
download | opensim-SC-840e4405413ae312f24317435c10652c6b3a9ce3.zip opensim-SC-840e4405413ae312f24317435c10652c6b3a9ce3.tar.gz opensim-SC-840e4405413ae312f24317435c10652c6b3a9ce3.tar.bz2 opensim-SC-840e4405413ae312f24317435c10652c6b3a9ce3.tar.xz |
When deleting an assembly before re-compile, make sure its attributes allow deletion.
This is to see if this helps with the problem in http://opensimulator.org/mantis/view.php?id=7278 where some DLLs are not allowing this.
Since OpenSim created the file it should always be allowed to delete it.
-rw-r--r-- | OpenSim/Region/ScriptEngine/Shared/CodeTools/Compiler.cs | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/CodeTools/Compiler.cs b/OpenSim/Region/ScriptEngine/Shared/CodeTools/Compiler.cs index de5f92d..52a34a6 100644 --- a/OpenSim/Region/ScriptEngine/Shared/CodeTools/Compiler.cs +++ b/OpenSim/Region/ScriptEngine/Shared/CodeTools/Compiler.cs | |||
@@ -469,7 +469,11 @@ namespace SecondLife | |||
469 | scriptCompileCounter++; | 469 | scriptCompileCounter++; |
470 | try | 470 | try |
471 | { | 471 | { |
472 | File.Delete(assembly); | 472 | if (File.Exists(assembly)) |
473 | { | ||
474 | File.SetAttributes(assembly, FileAttributes.Normal); | ||
475 | File.Delete(assembly); | ||
476 | } | ||
473 | } | 477 | } |
474 | catch (Exception e) // NOTLEGIT - Should be just FileIOException | 478 | catch (Exception e) // NOTLEGIT - Should be just FileIOException |
475 | { | 479 | { |