From 36dc5fc85be38abc7137d7f049962a65d066c239 Mon Sep 17 00:00:00 2001 From: Christopher Faylor Date: Sun, 16 Apr 2000 00:08:00 +0000 Subject: [PATCH] * setup.c (processdirlisting): Make "N" option a little less aggressive. --- ChangeLog | 4 ++++ setup.c | 16 ++++++++++------ 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/ChangeLog b/ChangeLog index fc12a504..110c218b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +Sat Apr 15 20:05:33 2000 Christopher Faylor + + * setup.c (processdirlisting): Make "N" option a little less aggressive. + Fri Apr 14 11:11:29 2000 Christopher Faylor * setup.c (tarx): Wait to after tar has completed to reset protections diff --git a/setup.c b/setup.c index 1079ab6f..12e5f7a8 100644 --- a/setup.c +++ b/setup.c @@ -618,17 +618,20 @@ processdirlisting (HINTERNET session, const char *urlbase, const char *file) { int download = 0; char *filename = strrchr (url, '/') + 1; - if (download_when == NEVER) - /* nothing to do */; - else if (download_when == ALWAYS || _access (filename, 0) == -1) + if (download_when == ALWAYS || _access (filename, 0) == -1) download = 1; else { char text[_MAX_PATH]; char *answer; - sprintf (text, "Replace %s from the net (ynAN)", filename); - answer = prompt (text, "y"); + if (download_when == NEVER) + answer = "N"; + else + { + sprintf (text, "Replace %s from the net (ynAN)", filename); + answer = prompt (text, "y"); + } if (answer) { @@ -644,6 +647,7 @@ processdirlisting (HINTERNET session, const char *urlbase, const char *file) break; case 'N': download_when = NEVER; + fprintf (stderr, "Skipping %s\n", filename); case 'n': default: download = 0; @@ -654,7 +658,7 @@ processdirlisting (HINTERNET session, const char *urlbase, const char *file) if (download) { - printf ("Downloading: %s...", url); + printf ("Downloading: %s...", filename); fflush (stdout); if (geturl (session, url, filename, 0)) { -- 2.43.5