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.
0.8.1-post-fixes
Justin Clark-Casey (justincc) 2015-01-23 00:45:51 +00:00
parent d0a2ea0857
commit 840e440541
1 changed files with 5 additions and 1 deletions

View File

@ -469,7 +469,11 @@ namespace SecondLife
scriptCompileCounter++; scriptCompileCounter++;
try try
{ {
File.Delete(assembly); if (File.Exists(assembly))
{
File.SetAttributes(assembly, FileAttributes.Normal);
File.Delete(assembly);
}
} }
catch (Exception e) // NOTLEGIT - Should be just FileIOException catch (Exception e) // NOTLEGIT - Should be just FileIOException
{ {