Просмотр исходного кода

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
Родитель
Сommit
104882f7fe
1 измененных файлов с 1 добавлено и 1 удалено
  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);
 }