QFile::copy: call syncToDisk on destination

Syncing the source makes no sense.

Fixes: QTBUG-86806
Change-Id: I0d3ff441bec041728945fffd1637205d9cf6ab72
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
bb10
Thiago Macieira 2020-09-22 07:09:38 -07:00
parent a07f35409b
commit ad9108e2e9
1 changed files with 1 additions and 1 deletions

View File

@ -838,7 +838,7 @@ QFile::copy(const QString &newName)
if (!error) {
// Sync to disk if possible. Ignore errors (e.g. not supported).
d->fileEngine->syncToDisk();
out.d_func()->fileEngine->syncToDisk();
if (!out.rename(newName)) {
error = true;