aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/CoreModules/Framework
diff options
context:
space:
mode:
authorDiva Canto2010-03-31 21:30:44 -0700
committerDiva Canto2010-03-31 21:30:44 -0700
commit08ba34da0325e3ed2a839cff62f2020742e887e7 (patch)
treecb5fc3693b3b6a029c476a4e24f9cd2eae4ad53f /OpenSim/Region/CoreModules/Framework
parentAdd missing licenses. Change relicensed LightShare module to proper BSD (diff)
downloadopensim-SC-08ba34da0325e3ed2a839cff62f2020742e887e7.zip
opensim-SC-08ba34da0325e3ed2a839cff62f2020742e887e7.tar.gz
opensim-SC-08ba34da0325e3ed2a839cff62f2020742e887e7.tar.bz2
opensim-SC-08ba34da0325e3ed2a839cff62f2020742e887e7.tar.xz
First attempt at fixing mantis #4641. It's better but there are now some issues with permissions.
(looks like my commit is going to touch CM files, I'm going to let it do it - eof only)
Diffstat (limited to 'OpenSim/Region/CoreModules/Framework')
-rw-r--r--OpenSim/Region/CoreModules/Framework/Library/LibraryModule.cs25
1 files changed, 21 insertions, 4 deletions
diff --git a/OpenSim/Region/CoreModules/Framework/Library/LibraryModule.cs b/OpenSim/Region/CoreModules/Framework/Library/LibraryModule.cs
index e37da9f..36dae6b 100644
--- a/OpenSim/Region/CoreModules/Framework/Library/LibraryModule.cs
+++ b/OpenSim/Region/CoreModules/Framework/Library/LibraryModule.cs
@@ -173,11 +173,11 @@ namespace OpenSim.Region.CoreModules.Framework.Library
173 m_log.InfoFormat("[LIBRARY MODULE]: Loading library archive {0} ({1})...", iarFileName, simpleName); 173 m_log.InfoFormat("[LIBRARY MODULE]: Loading library archive {0} ({1})...", iarFileName, simpleName);
174 simpleName = GetInventoryPathFromName(simpleName); 174 simpleName = GetInventoryPathFromName(simpleName);
175 175
176 InventoryArchiveReadRequest archread = new InventoryArchiveReadRequest(m_MockScene, uinfo, simpleName, iarFileName);
176 try 177 try
177 { 178 {
178 InventoryArchiveReadRequest archread = new InventoryArchiveReadRequest(m_MockScene, uinfo, simpleName, iarFileName);
179 List<InventoryNodeBase> nodes = archread.Execute(); 179 List<InventoryNodeBase> nodes = archread.Execute();
180 if (nodes.Count == 0) 180 if (nodes != null && nodes.Count == 0)
181 { 181 {
182 // didn't find the subfolder with the given name; place it on the top 182 // didn't find the subfolder with the given name; place it on the top
183 m_log.InfoFormat("[LIBRARY MODULE]: Didn't find {0} in library. Placing archive on the top level", simpleName); 183 m_log.InfoFormat("[LIBRARY MODULE]: Didn't find {0} in library. Placing archive on the top level", simpleName);
@@ -185,16 +185,33 @@ namespace OpenSim.Region.CoreModules.Framework.Library
185 archread = new InventoryArchiveReadRequest(m_MockScene, uinfo, "/", iarFileName); 185 archread = new InventoryArchiveReadRequest(m_MockScene, uinfo, "/", iarFileName);
186 archread.Execute(); 186 archread.Execute();
187 } 187 }
188 archread.Close(); 188 foreach (InventoryNodeBase node in nodes)
189 FixPerms(node);
189 } 190 }
190 catch (Exception e) 191 catch (Exception e)
191 { 192 {
192 m_log.DebugFormat("[LIBRARY MODULE]: Exception when processing archive {0}: {1}", iarFileName, e.Message); 193 m_log.DebugFormat("[LIBRARY MODULE]: Exception when processing archive {0}: {1}", iarFileName, e.StackTrace);
194 }
195 finally
196 {
197 archread.Close();
193 } 198 }
194 } 199 }
195 200
196 } 201 }
197 202
203 private void FixPerms(InventoryNodeBase node)
204 {
205 if (node is InventoryItemBase)
206 {
207 InventoryItemBase item = (InventoryItemBase)node;
208 item.BasePermissions = 0x7FFFFFFF;
209 item.EveryOnePermissions = 0x7FFFFFFF;
210 item.CurrentPermissions = 0x7FFFFFFF;
211 item.NextPermissions = 0x7FFFFFFF;
212 }
213 }
214
198 private void DumpLibrary() 215 private void DumpLibrary()
199 { 216 {
200 InventoryFolderImpl lib = m_Library.LibraryRootFolder; 217 InventoryFolderImpl lib = m_Library.LibraryRootFolder;