From 664f983943dd94d35184f5c0f69f8c58a011ba3a Mon Sep 17 00:00:00 2001 From: Justin Clarke Casey Date: Fri, 23 Jan 2009 19:24:36 +0000 Subject: * Extend archive test to check for the presence of a control file in a saved archive --- .../Environment/Modules/World/Archiver/ArchiveReadRequest.cs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'OpenSim/Region/Environment/Modules/World/Archiver/ArchiveReadRequest.cs') diff --git a/OpenSim/Region/Environment/Modules/World/Archiver/ArchiveReadRequest.cs b/OpenSim/Region/Environment/Modules/World/Archiver/ArchiveReadRequest.cs index 09776a7..bd58e7c 100644 --- a/OpenSim/Region/Environment/Modules/World/Archiver/ArchiveReadRequest.cs +++ b/OpenSim/Region/Environment/Modules/World/Archiver/ArchiveReadRequest.cs @@ -94,11 +94,13 @@ namespace OpenSim.Region.Environment.Modules.World.Archiver byte[] data; TarArchiveReader.TarEntryType entryType; + while ((data = archive.ReadEntry(out filePath, out entryType)) != null) { //m_log.DebugFormat( // "[ARCHIVER]: Successfully read {0} ({1} bytes)}", filePath, data.Length); - if (entryType==TarArchiveReader.TarEntryType.TYPE_DIRECTORY) { + if (TarArchiveReader.TarEntryType.TYPE_DIRECTORY == entryType) + { m_log.WarnFormat("[ARCHIVER]: Ignoring directory entry {0}", filePath); } @@ -407,7 +409,6 @@ namespace OpenSim.Region.Environment.Modules.World.Archiver private static Stream URIFetch(Uri uri) { - HttpWebRequest request = (HttpWebRequest) WebRequest.Create(uri); // request.Credentials = credentials; @@ -425,8 +426,6 @@ namespace OpenSim.Region.Environment.Modules.World.Archiver // return new BufferedStream(file, (int) response.ContentLength); return new BufferedStream(file, 1000000); - } - } } -- cgit v1.1