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)slimupdates
parent
21519d3311
commit
08ba34da03
|
@ -139,6 +139,9 @@ namespace OpenSim.Framework.Communications.Osp
|
||||||
/// </returns>
|
/// </returns>
|
||||||
protected static UUID ResolveOspaName(string name, IUserAccountService userService)
|
protected static UUID ResolveOspaName(string name, IUserAccountService userService)
|
||||||
{
|
{
|
||||||
|
if (userService == null)
|
||||||
|
return UUID.Zero;
|
||||||
|
|
||||||
int nameSeparatorIndex = name.IndexOf(OSPA_NAME_VALUE_SEPARATOR);
|
int nameSeparatorIndex = name.IndexOf(OSPA_NAME_VALUE_SEPARATOR);
|
||||||
|
|
||||||
if (nameSeparatorIndex < 0)
|
if (nameSeparatorIndex < 0)
|
||||||
|
|
|
@ -173,11 +173,11 @@ namespace OpenSim.Region.CoreModules.Framework.Library
|
||||||
m_log.InfoFormat("[LIBRARY MODULE]: Loading library archive {0} ({1})...", iarFileName, simpleName);
|
m_log.InfoFormat("[LIBRARY MODULE]: Loading library archive {0} ({1})...", iarFileName, simpleName);
|
||||||
simpleName = GetInventoryPathFromName(simpleName);
|
simpleName = GetInventoryPathFromName(simpleName);
|
||||||
|
|
||||||
|
InventoryArchiveReadRequest archread = new InventoryArchiveReadRequest(m_MockScene, uinfo, simpleName, iarFileName);
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
InventoryArchiveReadRequest archread = new InventoryArchiveReadRequest(m_MockScene, uinfo, simpleName, iarFileName);
|
|
||||||
List<InventoryNodeBase> nodes = archread.Execute();
|
List<InventoryNodeBase> nodes = archread.Execute();
|
||||||
if (nodes.Count == 0)
|
if (nodes != null && nodes.Count == 0)
|
||||||
{
|
{
|
||||||
// didn't find the subfolder with the given name; place it on the top
|
// didn't find the subfolder with the given name; place it on the top
|
||||||
m_log.InfoFormat("[LIBRARY MODULE]: Didn't find {0} in library. Placing archive on the top level", simpleName);
|
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
|
||||||
archread = new InventoryArchiveReadRequest(m_MockScene, uinfo, "/", iarFileName);
|
archread = new InventoryArchiveReadRequest(m_MockScene, uinfo, "/", iarFileName);
|
||||||
archread.Execute();
|
archread.Execute();
|
||||||
}
|
}
|
||||||
archread.Close();
|
foreach (InventoryNodeBase node in nodes)
|
||||||
|
FixPerms(node);
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
m_log.DebugFormat("[LIBRARY MODULE]: Exception when processing archive {0}: {1}", iarFileName, e.Message);
|
m_log.DebugFormat("[LIBRARY MODULE]: Exception when processing archive {0}: {1}", iarFileName, e.StackTrace);
|
||||||
|
}
|
||||||
|
finally
|
||||||
|
{
|
||||||
|
archread.Close();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void FixPerms(InventoryNodeBase node)
|
||||||
|
{
|
||||||
|
if (node is InventoryItemBase)
|
||||||
|
{
|
||||||
|
InventoryItemBase item = (InventoryItemBase)node;
|
||||||
|
item.BasePermissions = 0x7FFFFFFF;
|
||||||
|
item.EveryOnePermissions = 0x7FFFFFFF;
|
||||||
|
item.CurrentPermissions = 0x7FFFFFFF;
|
||||||
|
item.NextPermissions = 0x7FFFFFFF;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private void DumpLibrary()
|
private void DumpLibrary()
|
||||||
{
|
{
|
||||||
InventoryFolderImpl lib = m_Library.LibraryRootFolder;
|
InventoryFolderImpl lib = m_Library.LibraryRootFolder;
|
||||||
|
|
Loading…
Reference in New Issue