Bläddra i källkod

dpkg-split: Fix --auto to not fail when opening the new depot file

The code was wrongly checking for non-zero file descriptors returned
from creat(2), which was making it always fail.

Regression introduced in commit 102aef24e438b7aba9cf90ab9fc75d3c13c6c7cf.
Guillem Jover 15 år sedan
förälder
incheckning
9938066859
2 ändrade filer med 7 tillägg och 1 borttagningar
  1. 6 0
      debian/changelog
  2. 1 1
      dpkg-split/queue.c

+ 6 - 0
debian/changelog

@@ -1,3 +1,9 @@
+dpkg (1.16.0.2) UNRELEASED; urgency=low
+
+  * Fix dpkg-split --auto to not fail when opening the new depot file.
+
+ -- Guillem Jover <guillem@debian.org>  Fri, 15 Apr 2011 23:57:19 +0200
+
 dpkg (1.16.0.1) unstable; urgency=low
 
   [ Raphaël Hertzog ]

+ 1 - 1
dpkg-split/queue.c

@@ -178,7 +178,7 @@ do_auto(const char *const *argv)
     if (fd_src < 0)
       ohshite(_("unable to reopen part file `%.250s'"), partfile);
     fd_dst = creat(p, 0644);
-    if (fd_dst)
+    if (fd_dst < 0)
       ohshite(_("unable to open new depot file `%.250s'"), p);
 
     fd_fd_copy(fd_src, fd_dst, refi->filesize, _("extracting split part"));