Bläddra i källkod

dpkg: Do not bogusly ignore find exit code 1

Commit 68b56dc4edaaf90f5311f07b38871ddd61b84a48 introduced the
PROCNOERR to try to handle and be able to ignore find exit code 1,
which supposedly happened (not any longer) when using the -follow
option and a dangling symlink was found.

But it only prevented the ohshit() inside checksubprocerr(), and the
return value was still -1, so it was not ignoring the exit code 1,
and still ohshit()ing in the caller.

As find does currently exit with a 0 code even when finding broken
symlinks, let's remove this piece of broken logic.
Guillem Jover 16 år sedan
förälder
incheckning
b4d4968715
1 ändrade filer med 1 tillägg och 1 borttagningar
  1. 1 1
      src/archives.c

+ 1 - 1
src/archives.c

@@ -1118,7 +1118,7 @@ void archivefiles(const char *const *argv) {
     if (ferror(pf)) ohshite(_("error reading find's pipe"));
     if (fclose(pf)) ohshite(_("error closing find's pipe"));
     r = subproc_wait_check(fc, "find", PROCNOERR);
-    if(!(r==0 || r==1))
+    if (r != 0)
       ohshit(_("find for --recursive returned unhandled error %i"),r);
 
     if (!nfiles)