aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthias Andree <matthias.andree@gmx.de>2008-07-03 14:35:41 +0000
committerMatthias Andree <matthias.andree@gmx.de>2008-07-03 14:35:41 +0000
commitc8063ce622e7622fb58561dfc48028b39cba4906 (patch)
treed29a2996073cc9339f6be9ee5c5733a766bf2587
parent7cf37fb82f0030b6582c8b53191a6712a4085c5d (diff)
downloadfetchmail-c8063ce622e7622fb58561dfc48028b39cba4906.tar.gz
fetchmail-c8063ce622e7622fb58561dfc48028b39cba4906.tar.bz2
fetchmail-c8063ce622e7622fb58561dfc48028b39cba4906.zip
Only print "Deleting fetchids file" if there actually is one.
Fixes Debian Bug#374514, reported by Dan Jacobson. svn path=/branches/BRANCH_6-3/; revision=5213
-rw-r--r--NEWS2
-rw-r--r--uid.c6
2 files changed, 6 insertions, 2 deletions
diff --git a/NEWS b/NEWS
index da50ce3d..1dc45357 100644
--- 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 82bb4add..a4164b44 100644
--- 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 {