aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2010-12-11 02:18:16 +0000
committerJustin Clark-Casey (justincc)2010-12-11 02:18:16 +0000
commit387f743993456bb7dbc6ea639bfa98db4567789c (patch)
treef578383881dd902d96f36e4d03d96eae0a1ce5e1 /OpenSim
parentDrop current OAR version back to 0.5 since these are currently now compatible... (diff)
downloadopensim-SC_OLD-387f743993456bb7dbc6ea639bfa98db4567789c.zip
opensim-SC_OLD-387f743993456bb7dbc6ea639bfa98db4567789c.tar.gz
opensim-SC_OLD-387f743993456bb7dbc6ea639bfa98db4567789c.tar.bz2
opensim-SC_OLD-387f743993456bb7dbc6ea639bfa98db4567789c.tar.xz
If we're saving an IAR with --profile information, then label this a version 1.0 IAR since it isn't compatible with older OpenSim releases.
Diffstat (limited to 'OpenSim')
-rw-r--r--OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveWriteRequest.cs27
1 files changed, 22 insertions, 5 deletions
diff --git a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveWriteRequest.cs b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveWriteRequest.cs
index cab341d..5e5f6c0 100644
--- a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveWriteRequest.cs
+++ b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveWriteRequest.cs
@@ -156,7 +156,11 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
156 /// <param name="inventoryFolder">The inventory folder to save</param> 156 /// <param name="inventoryFolder">The inventory folder to save</param>
157 /// <param name="path">The path to which the folder should be saved</param> 157 /// <param name="path">The path to which the folder should be saved</param>
158 /// <param name="saveThisFolderItself">If true, save this folder itself. If false, only saves contents</param> 158 /// <param name="saveThisFolderItself">If true, save this folder itself. If false, only saves contents</param>
159 protected void SaveInvFolder(InventoryFolderBase inventoryFolder, string path, bool saveThisFolderItself, Dictionary<string, object> options, IUserAccountService userAccountService) 159 /// <param name="options"></param>
160 /// <param name="userAccountService"></param>
161 protected void SaveInvFolder(
162 InventoryFolderBase inventoryFolder, string path, bool saveThisFolderItself,
163 Dictionary<string, object> options, IUserAccountService userAccountService)
160 { 164 {
161 if (saveThisFolderItself) 165 if (saveThisFolderItself)
162 { 166 {
@@ -249,7 +253,8 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
249 253
250 // Write out control file. This has to be done first so that subsequent loaders will see this file first 254 // Write out control file. This has to be done first so that subsequent loaders will see this file first
251 // XXX: I know this is a weak way of doing it since external non-OAR aware tar executables will not do this 255 // XXX: I know this is a weak way of doing it since external non-OAR aware tar executables will not do this
252 m_archiveWriter.WriteFile(ArchiveConstants.CONTROL_FILE_PATH, Create0p1ControlFile()); 256 // not sure how to fix this though, short of going with a completely different file format.
257 m_archiveWriter.WriteFile(ArchiveConstants.CONTROL_FILE_PATH, CreateControlFile(options));
253 m_log.InfoFormat("[INVENTORY ARCHIVER]: Added control file to archive."); 258 m_log.InfoFormat("[INVENTORY ARCHIVER]: Added control file to archive.");
254 259
255 if (inventoryFolder != null) 260 if (inventoryFolder != null)
@@ -372,12 +377,24 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
372 } 377 }
373 378
374 /// <summary> 379 /// <summary>
375 /// Create the control file for a 0.1 version archive 380 /// Create the control file for the archive
376 /// </summary> 381 /// </summary>
382 /// <param name="options"></param>
377 /// <returns></returns> 383 /// <returns></returns>
378 public static string Create0p1ControlFile() 384 public static string CreateControlFile(Dictionary<string, object> options)
379 { 385 {
380 int majorVersion = 0, minorVersion = 1; 386 int majorVersion, minorVersion;
387
388 if (options.ContainsKey("profile"))
389 {
390 majorVersion = 1;
391 minorVersion = 0;
392 }
393 else
394 {
395 majorVersion = 0;
396 minorVersion = 1;
397 }
381 398
382 m_log.InfoFormat("[INVENTORY ARCHIVER]: Creating version {0}.{1} IAR", majorVersion, minorVersion); 399 m_log.InfoFormat("[INVENTORY ARCHIVER]: Creating version {0}.{1} IAR", majorVersion, minorVersion);
383 400