diff options
| author | Dag-Erling Smørgrav <des@FreeBSD.org> | 2000-06-29 08:39:29 +0000 |
|---|---|---|
| committer | Dag-Erling Smørgrav <des@FreeBSD.org> | 2000-06-29 08:39:29 +0000 |
| commit | df6f33d182a0453ae096995cbd941ba9690fd78f (patch) | |
| tree | 9a7fbbfad672de22e4c56625e96d3416d183d568 /usr.bin/fetch | |
| parent | 0b74850760b1dc0f2d42d656994e716eb656dd6e (diff) | |
Notes
Diffstat (limited to 'usr.bin/fetch')
| -rw-r--r-- | usr.bin/fetch/fetch.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/usr.bin/fetch/fetch.c b/usr.bin/fetch/fetch.c index d063100d126b..48d3da175308 100644 --- a/usr.bin/fetch/fetch.c +++ b/usr.bin/fetch/fetch.c @@ -293,6 +293,8 @@ fetch(char *URL, char *path) /* start the transfer */ if ((f = fetchGet(url, flags)) == NULL) { warnx("%s", fetchLastErrString); + if (!R_flag && !r_flag && !o_stdout) + unlink(path); goto failure; } @@ -358,7 +360,7 @@ fetch(char *URL, char *path) if (ferror(of)) warn("%s", path); if (ferror(f) || ferror(of)) { - if (!R_flag && !o_stdout) + if (!R_flag && !r_flag && !o_stdout) unlink(path); goto failure; } |
