X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=src%2Fbuffer.c;h=4b44eaf13b9844b39e7bc6b8c80adbb93c19e882;hb=2c06a80918019471876956eef4ef22f05c9e0571;hp=1452940be72a31fde8caae50cad880d3a4737181;hpb=cd7bdd4076ca154575bbef85eb2157e59befcfe2;p=chaz%2Ftar diff --git a/src/buffer.c b/src/buffer.c index 1452940..4b44eaf 100644 --- a/src/buffer.c +++ b/src/buffer.c @@ -722,9 +722,6 @@ _open_archive (enum access_mode wanted_access) break; } } - else if (verify_option) - archive = rmtopen (archive_name_array[0], O_RDWR | O_CREAT | O_BINARY, - MODE_RW, rsh_command_option); else switch (wanted_access) { @@ -740,8 +737,12 @@ _open_archive (enum access_mode wanted_access) maybe_backup_file (archive_name_array[0], 1); backed_up_flag = 1; } - archive = rmtcreat (archive_name_array[0], MODE_RW, - rsh_command_option); + if (verify_option) + archive = rmtopen (archive_name_array[0], O_RDWR | O_CREAT | O_BINARY, + MODE_RW, rsh_command_option); + else + archive = rmtcreat (archive_name_array[0], MODE_RW, + rsh_command_option); break; case ACCESS_UPDATE: @@ -883,16 +884,16 @@ short_read (size_t status) left = record_size - status; if (left && left % BLOCKSIZE == 0 - && verbose_option + && (warning_option & WARN_RECORD_SIZE) && record_start_block == 0 && status != 0 && archive_is_dev ()) { unsigned long rsize = status / BLOCKSIZE; WARN ((0, 0, - ngettext ("Record size = %lu block", - "Record size = %lu blocks", - rsize), - rsize)); + ngettext ("Record size = %lu block", + "Record size = %lu blocks", + rsize), + rsize)); } while (left % BLOCKSIZE != 0