aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs')
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs9
1 files changed, 5 insertions, 4 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs b/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs
index 9da2168..637c556 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs
@@ -1065,10 +1065,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance
1065 { 1065 {
1066 try 1066 try
1067 { 1067 {
1068 FileStream fs = File.Create(Path.Combine(Path.GetDirectoryName(assembly), ItemID.ToString() + ".state")); 1068 using (FileStream fs = File.Create(Path.Combine(Path.GetDirectoryName(assembly), ItemID.ToString() + ".state")))
1069 Byte[] buf = Util.UTF8NoBomEncoding.GetBytes(xml); 1069 {
1070 fs.Write(buf, 0, buf.Length); 1070 Byte[] buf = Util.UTF8NoBomEncoding.GetBytes(xml);
1071 fs.Close(); 1071 fs.Write(buf, 0, buf.Length);
1072 }
1072 } 1073 }
1073 catch(Exception) 1074 catch(Exception)
1074 { 1075 {