From c8063ce622e7622fb58561dfc48028b39cba4906 Mon Sep 17 00:00:00 2001 From: Matthias Andree Date: Thu, 3 Jul 2008 14:35:41 +0000 Subject: 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 --- uid.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'uid.c') 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 { -- cgit v1.2.3