summaryrefslogtreecommitdiffstats
path: root/src/corelib/io
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@intel.com>2020-09-22 07:09:38 -0700
committerFriedemann Kleint <Friedemann.Kleint@qt.io>2021-04-21 07:50:42 +0200
commit6c4e0e78b6d316df2c0b5897e19a4fac991c2efe (patch)
tree67632c7c082b8c5fd52bfb1d4b429d6d0f9d269f /src/corelib/io
parentd2068a8108c9ba0168c6f107d2e000c40bd23bdf (diff)
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> (cherry picked from commit ad9108e2e96ebf67147a72a7dab00398ff637695) Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Diffstat (limited to 'src/corelib/io')
-rw-r--r--src/corelib/io/qfile.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/corelib/io/qfile.cpp b/src/corelib/io/qfile.cpp
index f4cce8e034..6bc66c9c8e 100644
--- a/src/corelib/io/qfile.cpp
+++ b/src/corelib/io/qfile.cpp
@@ -910,7 +910,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;