From eda5f5556f353c2403f846d74104d000c00aff90 Mon Sep 17 00:00:00 2001 From: Julian Andres Klode Date: Tue, 2 Feb 2010 17:15:18 +0100 Subject: python/tarfile.cc: If only one member is requested, extract just that one. --- debian/changelog | 1 + python/tarfile.cc | 2 ++ 2 files changed, 3 insertions(+) diff --git a/debian/changelog b/debian/changelog index 2a10635d..51472a0c 100644 --- a/debian/changelog +++ b/debian/changelog @@ -12,6 +12,7 @@ python-apt (0.7.93.1) UNRELEASED; urgency=low - Do not segfault if TarFile.go() is called without a member name. - Clone all pkgDirStream::Item's so apt_pkg.TarMember object can be used outside of the callback function passed to go(). + - If only one member is requested, extract just that one. * Drop the segfault prevention measures from the Acquire code, as they fail to work. A replacement will be added once destruction callbacks are added in APT. diff --git a/python/tarfile.cc b/python/tarfile.cc index aa9a39f6..6363af0f 100644 --- a/python/tarfile.cc +++ b/python/tarfile.cc @@ -78,6 +78,8 @@ bool PyDirStream::DoItem(Item &Itm, int &Fd) copy_size = Itm.Size; } Fd = -2; + } else { + Fd = -1; } return true; } -- cgit v1.2.3