aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment/Modules/Avatar
diff options
context:
space:
mode:
authorDr Scofield2009-01-22 16:43:09 +0000
committerDr Scofield2009-01-22 16:43:09 +0000
commit7e08d7da157294640e72c22a521ae233bad2b84c (patch)
treea7b718ee1384cd3a1e3cfebac21c5d56c150c794 /OpenSim/Region/Environment/Modules/Avatar
parentUpdate svn properties, minor formatting cleanup. (diff)
downloadopensim-SC_OLD-7e08d7da157294640e72c22a521ae233bad2b84c.zip
opensim-SC_OLD-7e08d7da157294640e72c22a521ae233bad2b84c.tar.gz
opensim-SC_OLD-7e08d7da157294640e72c22a521ae233bad2b84c.tar.bz2
opensim-SC_OLD-7e08d7da157294640e72c22a521ae233bad2b84c.tar.xz
From: Christopher Yeoh <yeohc@au1.ibm.com>
this patch makes load-oar a bit more tolerant to irrelevant differences in the oar file format. Directory entries are now ignored rather than trying to interpret them as files they hold which results in the load-oar failing. This change makes it easier to manually modify oar files.
Diffstat (limited to 'OpenSim/Region/Environment/Modules/Avatar')
-rw-r--r--OpenSim/Region/Environment/Modules/Avatar/Inventory/Archiver/InventoryArchiveReadRequest.cs8
1 files changed, 6 insertions, 2 deletions
diff --git a/OpenSim/Region/Environment/Modules/Avatar/Inventory/Archiver/InventoryArchiveReadRequest.cs b/OpenSim/Region/Environment/Modules/Avatar/Inventory/Archiver/InventoryArchiveReadRequest.cs
index eab4461..e15a232 100644
--- a/OpenSim/Region/Environment/Modules/Avatar/Inventory/Archiver/InventoryArchiveReadRequest.cs
+++ b/OpenSim/Region/Environment/Modules/Avatar/Inventory/Archiver/InventoryArchiveReadRequest.cs
@@ -187,9 +187,13 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Inventory.Archiver
187 new FileStream(loadPath, FileMode.Open), CompressionMode.Decompress)); 187 new FileStream(loadPath, FileMode.Open), CompressionMode.Decompress));
188 188
189 byte[] data; 189 byte[] data;
190 while ((data = archive.ReadEntry(out filePath)) != null) 190 TarArchiveReader.TarEntryType entryType;
191 while ((data = archive.ReadEntry(out filePath, out entryType)) != null)
191 { 192 {
192 if (filePath.StartsWith(ArchiveConstants.ASSETS_PATH)) 193 if (entryType==TarArchiveReader.TarEntryType.TYPE_DIRECTORY) {
194 m_log.WarnFormat("[ARCHIVER]: Ignoring directory entry {0}",
195 filePath);
196 } else if (filePath.StartsWith(ArchiveConstants.ASSETS_PATH))
193 { 197 {
194 if (LoadAsset(filePath, data)) 198 if (LoadAsset(filePath, data))
195 successfulAssetRestores++; 199 successfulAssetRestores++;