From 5f7e392c7cc9410262dfb3333d9b60f6ff26eb79 Mon Sep 17 00:00:00 2001 From: Mic Bowman Date: Tue, 10 Jan 2012 16:26:01 -0800 Subject: Add a check to see if an asset exists before recreating it while loading an archive. This does add an extra roundtrip to the asset server if loading new assets but it protects against overwriting (and potentially corrupting) existing assets. --- OpenSim/Region/CoreModules/World/Archiver/ArchiveReadRequest.cs | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'OpenSim/Region/CoreModules/World/Archiver') diff --git a/OpenSim/Region/CoreModules/World/Archiver/ArchiveReadRequest.cs b/OpenSim/Region/CoreModules/World/Archiver/ArchiveReadRequest.cs index 587d260..edc5ba4 100644 --- a/OpenSim/Region/CoreModules/World/Archiver/ArchiveReadRequest.cs +++ b/OpenSim/Region/CoreModules/World/Archiver/ArchiveReadRequest.cs @@ -404,6 +404,12 @@ namespace OpenSim.Region.CoreModules.World.Archiver string extension = filename.Substring(i); string uuid = filename.Remove(filename.Length - extension.Length); + if (m_scene.AssetService.GetMetadata(uuid) != null) + { + // m_log.DebugFormat("[ARCHIVER]: found existing asset {0}",uuid); + return true; + } + if (ArchiveConstants.EXTENSION_TO_ASSET_TYPE.ContainsKey(extension)) { sbyte assetType = ArchiveConstants.EXTENSION_TO_ASSET_TYPE[extension]; -- cgit v1.1 From 8bdd80abfa3830142b16615d97d555dad417e08d Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Thu, 12 Jan 2012 09:56:35 -0800 Subject: HG: normalize all externalized user ULRs to be the Home URL, i.e. the location of the user's UAS. This corrects an earlier design which had some cases pointing to the profile server. WARNING: CONFIGURATION CHANGES in both the sims (*Common.ini) and the Robust configs (Robust.HG.ini). Please check diff of the example files, but basically all vars that were pointing to profile should point to the UAS instead and should be called HomeURI. --- OpenSim/Region/CoreModules/World/Archiver/ArchiverModule.cs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'OpenSim/Region/CoreModules/World/Archiver') diff --git a/OpenSim/Region/CoreModules/World/Archiver/ArchiverModule.cs b/OpenSim/Region/CoreModules/World/Archiver/ArchiverModule.cs index f44a3ba..0707cbe 100644 --- a/OpenSim/Region/CoreModules/World/Archiver/ArchiverModule.cs +++ b/OpenSim/Region/CoreModules/World/Archiver/ArchiverModule.cs @@ -125,8 +125,12 @@ namespace OpenSim.Region.CoreModules.World.Archiver Dictionary options = new Dictionary(); OptionSet ops = new OptionSet(); -// ops.Add("v|version=", delegate(string v) { options["version"] = v; }); - ops.Add("p|profile=", delegate(string v) { options["profile"] = v; }); + + // legacy argument [obsolete] + ops.Add("p|profile=", delegate(string v) { Console.WriteLine("\n WARNING: -profile option is obsolete and it will not work. Use -home instead.\n"); }); + // preferred + ops.Add("h|home=", delegate(string v) { options["home"] = v; }); + ops.Add("noassets", delegate(string v) { options["noassets"] = v != null; }); ops.Add("perm=", delegate(string v) { options["checkPermissions"] = v; }); -- cgit v1.1