Browse Source

libdpkg: Do not fail on current file removal in trk_explicit_interest_change

In case the new trigger interest file is empty and as such not needed
any longer, do not fail if the current file is not present.

Regression introduced in commit 83b591340ec92cf0e9814e8403da7711cbbc6b46.
Guillem Jover 15 years ago
parent
commit
104882f7fe
1 changed files with 1 additions and 1 deletions
  1. 1 1
      lib/dpkg/triglib.c

+ 1 - 1
lib/dpkg/triglib.c

@@ -430,7 +430,7 @@ trk_explicit_interest_remove(const char *newfilename)
 {
 	if (unlink(newfilename))
 		ohshite(_("cannot remove `%.250s'"), newfilename);
-	if (unlink(trk_explicit_fn.buf))
+	if (unlink(trk_explicit_fn.buf) && errno != ENOENT)
 		ohshite(_("cannot remove `%.250s'"), trk_explicit_fn.buf);
 }