summaryrefslogtreecommitdiff
path: root/cmdline
diff options
context:
space:
mode:
authorDavid Kalnischkies <kalnischkies@gmail.com>2010-06-05 19:14:32 +0200
committerDavid Kalnischkies <kalnischkies@gmail.com>2010-06-05 19:14:32 +0200
commit07c279d93f0b61e96c9caf8139accd0289feab56 (patch)
tree5f31632d9ea246de448731eff9f064d606ed93b0 /cmdline
parent84910ad5090b8cffc81d7942497ca09cc5d93244 (diff)
do not fail if an unrelated error is pending in DisplayRecord()
Diffstat (limited to 'cmdline')
-rw-r--r--cmdline/apt-cache.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/cmdline/apt-cache.cc b/cmdline/apt-cache.cc
index ef074280e..de4288c5a 100644
--- a/cmdline/apt-cache.cc
+++ b/cmdline/apt-cache.cc
@@ -1243,11 +1243,11 @@ bool DisplayRecord(pkgCacheFile &CacheFile, pkgCache::VerIterator V)
pkgCache::PkgFileIterator I = Vf.File();
if (I.IsOk() == false)
return _error->Error(_("Package file %s is out of sync."),I.FileName());
-
- FileFd PkgF(I.FileName(),FileFd::ReadOnly);
- if (_error->PendingError() == true)
+
+ FileFd PkgF;
+ if (PkgF.Open(I.FileName(), FileFd::ReadOnly) == false)
return false;
-
+
// Read the record
unsigned char *Buffer = new unsigned char[Cache->HeaderP->MaxVerFileSize+1];
Buffer[V.FileList()->Size] = '\n';