aboutsummaryrefslogtreecommitdiffstats
path: root/fetchmail.c
diff options
context:
space:
mode:
authorMatthias Andree <matthias.andree@gmx.de>2006-06-12 11:45:05 +0000
committerMatthias Andree <matthias.andree@gmx.de>2006-06-12 11:45:05 +0000
commitb63baae8d86d19a53f97dad36961488ae777b4e3 (patch)
tree1e159da7d883c411e7945293467988ee2392055d /fetchmail.c
parentc1e2f371ae74f580893a54342431301ec6cf2725 (diff)
downloadfetchmail-b63baae8d86d19a53f97dad36961488ae777b4e3.tar.gz
fetchmail-b63baae8d86d19a53f97dad36961488ae777b4e3.tar.bz2
fetchmail-b63baae8d86d19a53f97dad36961488ae777b4e3.zip
No longer stat rcfile if it's called -.
Fixes BerliOS bug #7858. svn path=/branches/BRANCH_6-3/; revision=4853
Diffstat (limited to 'fetchmail.c')
-rw-r--r--fetchmail.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/fetchmail.c b/fetchmail.c
index dd082f2f..1c895a0a 100644
--- a/fetchmail.c
+++ b/fetchmail.c
@@ -597,8 +597,9 @@ int main(int argc, char **argv)
*/
struct stat rcstat;
- if (stat(rcfile, &rcstat) == -1)
- {
+ if (strcmp(rcfile, "-") == 0) {
+ /* do nothing */
+ } else if (stat(rcfile, &rcstat) == -1) {
if (errno != ENOENT)
report(stderr,
GT_("couldn't time-check %s (error %d)\n"),
@@ -986,7 +987,7 @@ static int load_params(int argc, char **argv, int optind)
/* note the parse time, so we can pick up on modifications */
parsetime = 0; /* foil compiler warnings */
- if (stat(rcfile, &rcstat) != -1)
+ if (strcmp(rcfile, "-") == 0 || stat(rcfile, &rcstat) != -1)
parsetime = rcstat.st_mtime;
else if (errno != ENOENT)
report(stderr, GT_("couldn't time-check the run-control file\n"));