]> Pileus Git - ~andy/fetchmail/commitdiff
Only print "Deleting fetchids file" if there actually is one.
authorMatthias Andree <matthias.andree@gmx.de>
Thu, 3 Jul 2008 14:35:41 +0000 (14:35 -0000)
committerMatthias Andree <matthias.andree@gmx.de>
Thu, 3 Jul 2008 14:35:41 +0000 (14:35 -0000)
Fixes Debian Bug#374514, reported by Dan Jacobson.

svn path=/branches/BRANCH_6-3/; revision=5213

NEWS
uid.c

diff --git a/NEWS b/NEWS
index da50ce3dc11d5411a143584e400f9efed7164983..1dc45357365ec7c2e81330b725e3df476cb0825c 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -85,6 +85,8 @@ fetchmail 6.3.9 (not yet released):
   TOCTOU race persists.
 * fetchmailconf quotes mailbox (folder) names when writing the configuration.
   Fixes BerliOS Bug #13207 (reported + fix suggested by Terry Brown).
+* Only print "Deleting fetchids file" if there actually is one.
+  Fixes Debian Bug#374514, reported by Dan Jacobson.
 
 # CHANGES:
 * autoconf 2.60 is now required to build fetchmail; it uses
diff --git a/uid.c b/uid.c
index 82bb4addddfde61753f679908f12ca18268b2fd7..a4164b442c96cf442ae11f4d2a068cacfa69430f 100644 (file)
--- a/uid.c
+++ b/uid.c
@@ -612,8 +612,10 @@ void write_saved_lists(struct query *hostlist, const char *idfile)
     /* either nuke the file or write updated last-seen IDs */
     if (!idcount && !scratchlist)
     {
-       if (outlevel >= O_DEBUG)
-           report(stdout, GT_("Deleting fetchids file.\n"));
+       if (outlevel >= O_DEBUG) {
+           if (access(idfile, F_OK) == 0)
+                   report(stdout, GT_("Deleting fetchids file.\n"));
+       }
        if (unlink(idfile) && errno != ENOENT)
            report(stderr, GT_("Error deleting %s: %s\n"), idfile, strerror(errno));
     } else {