diff options
author | Julian Andres Klode <jak@debian.org> | 2014-03-15 17:59:47 +0100 |
---|---|---|
committer | Julian Andres Klode <jak@debian.org> | 2014-03-15 18:03:42 +0100 |
commit | f6ffe501d432d1299808ae307936877cf2c5f8ce (patch) | |
tree | 85bd5c7582ddb3fc64115c1a08c059d102b59ef3 /apt-pkg/contrib | |
parent | 574d8d43f755019c7223fe128b22b27fd836017d (diff) |
Fix handling of autoclosing for compressed files (Closes: #741685)
AutoClose is both an argument in OpenDescriptor() and an enum. In
commit 84baaae93badc2da7c1f4f356456762895cef278 code using the AutoClose
parameter was moved to OpenDescriptorInternal(). In that function,
AutoClose meant the enum value, so the check was always false.
Diffstat (limited to 'apt-pkg/contrib')
-rw-r--r-- | apt-pkg/contrib/fileutl.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/apt-pkg/contrib/fileutl.cc b/apt-pkg/contrib/fileutl.cc index 1eabf37f4..ba79720d8 100644 --- a/apt-pkg/contrib/fileutl.cc +++ b/apt-pkg/contrib/fileutl.cc @@ -1191,7 +1191,7 @@ bool FileFd::OpenInternDescriptor(unsigned int const Mode, APT::Configuration::C d->openmode = Mode; d->compressor = compressor; #if defined HAVE_ZLIB || defined HAVE_BZ2 || defined HAVE_LZMA - if (AutoClose == false && compress_open != NULL) + if ((Flags & AutoClose) != AutoClose && compress_open != NULL) { // Need to duplicate fd here or gz/bz2 close for cleanup will close the fd as well int const internFd = dup(iFd); |