From 9516ffa7c0b6e2e659b2edd36b9dafc9a9af5552 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dag-Erling=20Sm=C3=B8rgrav?= Date: Wed, 26 Jul 2000 07:28:33 +0000 Subject: [PATCH] Restore the old semantics of deleting the output file when interrupted. Some people liked this and some didn't, so POLA won. --- usr.bin/fetch/fetch.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/usr.bin/fetch/fetch.c b/usr.bin/fetch/fetch.c index cc49b9fd4044..ad605bf921e8 100644 --- a/usr.bin/fetch/fetch.c +++ b/usr.bin/fetch/fetch.c @@ -400,10 +400,12 @@ fetch(char *URL, char *path) signal: if (sigalrm) warnx("transfer timed out"); - if (sigint) + if (sigint) { warnx("transfer interrupted"); + goto failure; + } - if (!sigalrm && !sigint) { + if (!sigalrm) { /* check the status of our files */ if (ferror(f)) warn("%s", URL);