bug-coreutils
[Top][All Lists]
Advanced

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

bug#18316: [PATCH] warn on too large file copies


From: Paul Eggert
Subject: bug#18316: [PATCH] warn on too large file copies
Date: Fri, 22 Aug 2014 09:36:11 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.0

Adam wrote:
I believe when copying files as large as these, if the maximum transfer
were to be reached then the copy should not return false (as this will
delete the failed destination file), but instead produce a warning and
return true.

Sorry, I don't see the bug. max_n_nread is normally UINTMAX_MAX, which is effectively infinity, so it shouldn't be an issue then. When max_n_read is less than UINTMAX_MAX, we're copying one extent of a sparse file, and it's not an error to read less than the extent we expect to find, as that can happen when the file changed as we read it.

Perhaps cp should optionally warn if the input file changes while we read it, but that's a bigger change and one that should be done elsewhere.





reply via email to

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