From b711c01e777977a4f9e2b78d7ab91f09f3fdf03f Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Wed, 18 Jan 2012 00:40:38 +0100 Subject: improve error reporting in case of errors in combination with zlib --- apt-pkg/contrib/mmap.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'apt-pkg/contrib/mmap.cc') 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; } -- cgit v1.2.3