diff options
Diffstat (limited to 'OpenSim/Region/CoreModules/World/Archiver/ArchiverModule.cs')
-rw-r--r-- | OpenSim/Region/CoreModules/World/Archiver/ArchiverModule.cs | 22 |
1 files changed, 15 insertions, 7 deletions
diff --git a/OpenSim/Region/CoreModules/World/Archiver/ArchiverModule.cs b/OpenSim/Region/CoreModules/World/Archiver/ArchiverModule.cs index 2a87dc2..1be6386 100644 --- a/OpenSim/Region/CoreModules/World/Archiver/ArchiverModule.cs +++ b/OpenSim/Region/CoreModules/World/Archiver/ArchiverModule.cs | |||
@@ -32,6 +32,9 @@ using System.Reflection; | |||
32 | using log4net; | 32 | using log4net; |
33 | using NDesk.Options; | 33 | using NDesk.Options; |
34 | using Nini.Config; | 34 | using Nini.Config; |
35 | using Mono.Addins; | ||
36 | using OpenSim.Framework; | ||
37 | using OpenSim.Framework.Console; | ||
35 | using OpenSim.Region.Framework.Interfaces; | 38 | using OpenSim.Region.Framework.Interfaces; |
36 | using OpenSim.Region.Framework.Scenes; | 39 | using OpenSim.Region.Framework.Scenes; |
37 | 40 | ||
@@ -40,6 +43,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver | |||
40 | /// <summary> | 43 | /// <summary> |
41 | /// This module loads and saves OpenSimulator region archives | 44 | /// This module loads and saves OpenSimulator region archives |
42 | /// </summary> | 45 | /// </summary> |
46 | [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "ArchiverModule")] | ||
43 | public class ArchiverModule : INonSharedRegionModule, IRegionArchiverModule | 47 | public class ArchiverModule : INonSharedRegionModule, IRegionArchiverModule |
44 | { | 48 | { |
45 | private static readonly ILog m_log = | 49 | private static readonly ILog m_log = |
@@ -117,7 +121,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver | |||
117 | // | 121 | // |
118 | // foreach (string param in mainParams) | 122 | // foreach (string param in mainParams) |
119 | // m_log.DebugFormat("GOT PARAM [{0}]", param); | 123 | // m_log.DebugFormat("GOT PARAM [{0}]", param); |
120 | 124 | ||
121 | if (mainParams.Count > 2) | 125 | if (mainParams.Count > 2) |
122 | { | 126 | { |
123 | DearchiveRegion(mainParams[2], mergeOar, skipAssets, Guid.Empty); | 127 | DearchiveRegion(mainParams[2], mergeOar, skipAssets, Guid.Empty); |
@@ -150,14 +154,18 @@ namespace OpenSim.Region.CoreModules.World.Archiver | |||
150 | 154 | ||
151 | List<string> mainParams = ops.Parse(cmdparams); | 155 | List<string> mainParams = ops.Parse(cmdparams); |
152 | 156 | ||
157 | string path; | ||
153 | if (mainParams.Count > 2) | 158 | if (mainParams.Count > 2) |
154 | { | 159 | path = mainParams[2]; |
155 | ArchiveRegion(mainParams[2], options); | ||
156 | } | ||
157 | else | 160 | else |
158 | { | 161 | path = DEFAULT_OAR_BACKUP_FILENAME; |
159 | ArchiveRegion(DEFAULT_OAR_BACKUP_FILENAME, options); | 162 | |
160 | } | 163 | // Not doing this right now as this causes some problems with auto-backup systems. Maybe a force flag is |
164 | // needed | ||
165 | // if (!ConsoleUtil.CheckFileDoesNotExist(MainConsole.Instance, path)) | ||
166 | // return; | ||
167 | |||
168 | ArchiveRegion(path, options); | ||
161 | } | 169 | } |
162 | 170 | ||
163 | public void ArchiveRegion(string savePath, Dictionary<string, object> options) | 171 | public void ArchiveRegion(string savePath, Dictionary<string, object> options) |