X-Git-Url: https://git.brokenzipper.com/gitweb?a=blobdiff_plain;f=src%2Fbuffer.c;h=c0cedc3c8e9fa8be2d293268f944d424f2bdb453;hb=6c1020d386fefbb6b7c22ff1b25e1ea8fb8951d1;hp=9b6a11a8c6e59ba48f20d066bf355802086bc73e;hpb=588f444efea17a7746d07fbd39510ec842eb4137;p=chaz%2Ftar diff --git a/src/buffer.c b/src/buffer.c index 9b6a11a..c0cedc3 100644 --- a/src/buffer.c +++ b/src/buffer.c @@ -20,11 +20,13 @@ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #include +#include #include #include #include +#include #include #include @@ -966,6 +968,7 @@ new_volume (enum access_mode mode) { static FILE *read_file; static int looped; + int prompt; if (!read_file && !info_script_option) /* FIXME: if fopen is used, it will never be closed. */ @@ -989,9 +992,10 @@ new_volume (enum access_mode mode) archive_name_cursor = archive_name_array; looped = 1; } + prompt = looped; tryagain: - if (looped) + if (prompt) { /* We have to prompt from now on. */ @@ -1041,6 +1045,7 @@ new_volume (enum access_mode mode) open_warn (*archive_name_cursor); if (!verify_option && mode == ACCESS_WRITE && backup_option) undo_last_backup (); + prompt = 1; goto tryagain; }