aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Server/Handlers/BakedTextures
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2014-12-20 01:32:49 +0000
committerJustin Clark-Casey (justincc)2014-12-20 01:32:49 +0000
commit9edc5cac96eaf65eb0dac0f3697f01f9a5c02055 (patch)
tree78e829a28fe625cb29bff2cd02153c31514cfb74 /OpenSim/Server/Handlers/BakedTextures
parentFix recent regression where a race condition meant SP.MakeRootAgent() would s... (diff)
downloadopensim-SC-9edc5cac96eaf65eb0dac0f3697f01f9a5c02055.zip
opensim-SC-9edc5cac96eaf65eb0dac0f3697f01f9a5c02055.tar.gz
opensim-SC-9edc5cac96eaf65eb0dac0f3697f01f9a5c02055.tar.bz2
opensim-SC-9edc5cac96eaf65eb0dac0f3697f01f9a5c02055.tar.xz
In XBakes use proper disposal semantics to always close the stream on Store() no matter what
Diffstat (limited to 'OpenSim/Server/Handlers/BakedTextures')
-rw-r--r--OpenSim/Server/Handlers/BakedTextures/XBakes.cs6
1 files changed, 2 insertions, 4 deletions
diff --git a/OpenSim/Server/Handlers/BakedTextures/XBakes.cs b/OpenSim/Server/Handlers/BakedTextures/XBakes.cs
index d1b2e12..4e55433 100644
--- a/OpenSim/Server/Handlers/BakedTextures/XBakes.cs
+++ b/OpenSim/Server/Handlers/BakedTextures/XBakes.cs
@@ -107,11 +107,9 @@ namespace OpenSim.Server.Handlers.BakedTextures
107 File.Delete(diskFile); 107 File.Delete(diskFile);
108 108
109 byte[] data = utf8encoding.GetBytes(sdata); 109 byte[] data = utf8encoding.GetBytes(sdata);
110 FileStream fs = File.Create(diskFile);
111 110
112 fs.Write(data, 0, data.Length); 111 using (FileStream fs = File.Create(diskFile))
113 112 fs.Write(data, 0, data.Length);
114 fs.Close();
115 } 113 }
116 114
117 private void HandleDeleteBakes(string module, string[] args) 115 private void HandleDeleteBakes(string module, string[] args)