diff options
author | Justin Clark-Casey (justincc) | 2014-12-20 01:32:49 +0000 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2014-12-20 01:32:49 +0000 |
commit | 9edc5cac96eaf65eb0dac0f3697f01f9a5c02055 (patch) | |
tree | 78e829a28fe625cb29bff2cd02153c31514cfb74 | |
parent | Fix recent regression where a race condition meant SP.MakeRootAgent() would s... (diff) | |
download | opensim-SC_OLD-9edc5cac96eaf65eb0dac0f3697f01f9a5c02055.zip opensim-SC_OLD-9edc5cac96eaf65eb0dac0f3697f01f9a5c02055.tar.gz opensim-SC_OLD-9edc5cac96eaf65eb0dac0f3697f01f9a5c02055.tar.bz2 opensim-SC_OLD-9edc5cac96eaf65eb0dac0f3697f01f9a5c02055.tar.xz |
In XBakes use proper disposal semantics to always close the stream on Store() no matter what
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Server/Handlers/BakedTextures/XBakes.cs | 6 |
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) |