summaryrefslogtreecommitdiff
path: root/apt-pkg/contrib/mmap.cc
diff options
context:
space:
mode:
authorDavid Kalnischkies <kalnischkies@gmail.com>2012-01-18 00:40:38 +0100
committerDavid Kalnischkies <kalnischkies@gmail.com>2012-01-18 00:40:38 +0100
commitb711c01e777977a4f9e2b78d7ab91f09f3fdf03f (patch)
treefdf4a691cc49b96466840d7a7c25ec90dab9587e /apt-pkg/contrib/mmap.cc
parent3e3c85e22dfb9180b5bab523eaa7c100605b8b3a (diff)
improve error reporting in case of errors in combination with zlib
Diffstat (limited to 'apt-pkg/contrib/mmap.cc')
-rw-r--r--apt-pkg/contrib/mmap.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/apt-pkg/contrib/mmap.cc b/apt-pkg/contrib/mmap.cc
index a67ab3698..160718ea5 100644
--- a/apt-pkg/contrib/mmap.cc
+++ b/apt-pkg/contrib/mmap.cc
@@ -85,7 +85,7 @@ bool MMap::Map(FileFd &Fd)
return _error->Error("Compressed file %s can only be mapped readonly", Fd.Name().c_str());
Base = new unsigned char[iSize];
if (Fd.Seek(0L) == false || Fd.Read(Base, iSize) == false)
- return false;
+ return _error->Error("Compressed file %s can't be read into mmap", Fd.Name().c_str());
return true;
}