bug-tar
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Bug-tar] Apply ignore-failed-read to "file changed as we read it" c


From: Stefanos Harhalakis
Subject: Re: [Bug-tar] Apply ignore-failed-read to "file changed as we read it" case
Date: Wed, 6 Jan 2016 01:02:24 +0000

Hi Pavel,

On Tue, Jan 5, 2016 at 8:43 PM, Pavel Raiskup <address@hidden> wrote:
> On Tuesday 05 of January 2016 15:54:57 Stefanos Harhalakis wrote:
>> Can you consider the attached patch?
>>
>> This will apply the --ignore-failed-read flag to the case where a file
>> was changed as we read it, thus preventing tar from exiting with a
>> failure.
>
> this does not look like the right approach.  The --ignore-failed-read is
> related to different problems, from man page:
>
>        --ignore-failed-read
>               Do not exit with nonzero on unreadable files.
>
> .. and the file is not unreadable.

I see that this option is also used in the below in create.c:

      if (count != bufsize)
        {
          char buf[UINTMAX_STRSIZE_BOUND];
          memset (blk->buffer + count, 0, bufsize - count);
          WARNOPT (WARN_FILE_SHRANK,
                   (0, 0,
                    ngettext ("%s: File shrank by %s byte; padding with zeros",
                              "%s: File shrank by %s bytes; padding with zeros",
                              size_left),
                    quotearg_colon (st->orig_file_name),
                    STRINGIFY_BIGINT (size_left, buf)));
          if (! ignore_failed_read_option)
            set_exit_status (TAREXIT_DIFFERS);

Aren't these two cases pretty similar?

Thanks,
Stefanos



reply via email to

[Prev in Thread] Current Thread [Next in Thread]