From 4260fd3972cc0c01e6cbc825063c06311d440f9b Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Thu, 21 Oct 2010 16:54:28 +0200 Subject: * apt-pkg/contrib/fileutl.cc: - Add a FileFd::FileSize() method to get the size of the underlying file and not the size of the content in the file as FileFd::Size() does - the sizes can differ since the direct gzip integration * methods/{gzip,bzip2}.cc: - use FileSize() to determine if the file is invalid (Closes: #600852) --- apt-pkg/contrib/fileutl.h | 1 + 1 file changed, 1 insertion(+) (limited to 'apt-pkg/contrib/fileutl.h') diff --git a/apt-pkg/contrib/fileutl.h b/apt-pkg/contrib/fileutl.h index 419506273..1380f06b4 100644 --- a/apt-pkg/contrib/fileutl.h +++ b/apt-pkg/contrib/fileutl.h @@ -63,6 +63,7 @@ class FileFd bool Truncate(unsigned long To); unsigned long Tell(); unsigned long Size(); + unsigned long FileSize(); bool Open(string FileName,OpenMode Mode,unsigned long Perms = 0666); bool OpenDescriptor(int Fd, OpenMode Mode, bool AutoClose=false); bool Close(); -- cgit v1.2.3