Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
QFile::copy(): don't trust the old file metadata cache
Instead, let's just use sendfile(2) in a loop until it returns 0, which indicates EOF. [ChangeLog][QtCore][QFile] Fixed a regression in QFile::copy() that caused the original file not to be copied entirely if it was modified outside of this QFile object between the last time we checked its size and the copy() call. Note this is not a prevention against race conditions. Task-number: QTBUG-69417 Change-Id: Id59bdd8f1a804b809e22fffd15406c8aa31f4a1e Reviewed-by: Simon Hausmann <[email protected]> Reviewed-by: Oswald Buddenhagen <[email protected]> Reviewed-by: Edward Welbourne <[email protected]>
- Loading branch information