summaryrefslogtreecommitdiff
path: root/apt-pkg/contrib
diff options
context:
space:
mode:
authorDavid Kalnischkies <david@kalnischkies.de>2020-05-13 23:01:38 +0200
committerDavid Kalnischkies <david@kalnischkies.de>2020-05-18 15:55:36 +0200
commit5534bb3ad346ef4435e6fd0fe326771a4bde16a1 (patch)
tree2739783e076a1468a3a9e206ec35f8af35375753 /apt-pkg/contrib
parentc470d92366d7c3c239a689f0a10d6d0d9daafbff (diff)
Properly handle interrupted write() call in ExtractTar
With FileFd::Write we already have a helper for this situation we can just make use of here instead of hoping for the best or rolling our own solution here.
Diffstat (limited to 'apt-pkg/contrib')
-rw-r--r--apt-pkg/contrib/extracttar.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/apt-pkg/contrib/extracttar.cc b/apt-pkg/contrib/extracttar.cc
index b22f59dbc..923c26d6c 100644
--- a/apt-pkg/contrib/extracttar.cc
+++ b/apt-pkg/contrib/extracttar.cc
@@ -276,7 +276,7 @@ bool ExtractTar::Go(pkgDirStream &Stream)
{
if (Fd > 0)
{
- if (write(Fd,Junk,Read) != (signed)Read)
+ if (not FileFd::Write(Fd, Junk, Read))
return Stream.Fail(Itm,Fd);
}
else