diff options
author | Dr Scofield | 2009-01-22 16:43:09 +0000 |
---|---|---|
committer | Dr Scofield | 2009-01-22 16:43:09 +0000 |
commit | 7e08d7da157294640e72c22a521ae233bad2b84c (patch) | |
tree | a7b718ee1384cd3a1e3cfebac21c5d56c150c794 /OpenSim/Region/Environment/Modules/Avatar/Inventory/Archiver | |
parent | Update svn properties, minor formatting cleanup. (diff) | |
download | opensim-SC-7e08d7da157294640e72c22a521ae233bad2b84c.zip opensim-SC-7e08d7da157294640e72c22a521ae233bad2b84c.tar.gz opensim-SC-7e08d7da157294640e72c22a521ae233bad2b84c.tar.bz2 opensim-SC-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/Inventory/Archiver')
-rw-r--r-- | OpenSim/Region/Environment/Modules/Avatar/Inventory/Archiver/InventoryArchiveReadRequest.cs | 8 |
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++; |