GNU bug report logs -
#18316
[PATCH] warn on too large file copies
Previous Next
Reported by: adamjsho <at> gmail.com
Date: Fri, 22 Aug 2014 15:58:02 UTC
Severity: normal
Tags: fixed, patch
Done: Assaf Gordon <assafgordon <at> gmail.com>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
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.
This bug report was last modified 6 years and 310 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.