From 840e4405413ae312f24317435c10652c6b3a9ce3 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Fri, 23 Jan 2015 00:45:51 +0000 Subject: 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. --- OpenSim/Region/ScriptEngine/Shared/CodeTools/Compiler.cs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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 scriptCompileCounter++; try { - File.Delete(assembly); + if (File.Exists(assembly)) + { + File.SetAttributes(assembly, FileAttributes.Normal); + File.Delete(assembly); + } } catch (Exception e) // NOTLEGIT - Should be just FileIOException { -- cgit v1.1