diff options
Diffstat (limited to 'apt-pkg')
-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 86ca82cff..1ffa407bc 100644 --- a/apt-pkg/contrib/fileutl.cc +++ b/apt-pkg/contrib/fileutl.cc @@ -165,7 +165,7 @@ bool CopyFile(FileFd &From,FileFd &To) unsigned long long ToRead = 0; do { if (From.Read(Buf.get(),BufSize, &ToRead) == false || - To.Write(Buf.get(),ToRead) == false) + (ToRead > 0 && To.Write(Buf.get(),ToRead) == false)) return false; } while (ToRead != 0); |