aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian Kandeler <christian.kandeler@qt.io>2016-11-24 16:54:39 +0100
committerChristian Kandeler <christian.kandeler@qt.io>2016-11-25 09:39:20 +0000
commit83325ac2948b22623d833353fd1c5c7ecd2bae80 (patch)
tree2ee2ed98aae0a823d02e6443903b3fa21cb2b79e
parent6b3cd80665069b5fcbeb6513b391c1051131ca00 (diff)
Do not follow symbolic links in File.copy()
Doing that is very likely not what the user wants. Change-Id: I1681809e6840745f11f5495cc13e2f0778d08c9a Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
-rw-r--r--src/lib/corelib/jsextensions/file.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lib/corelib/jsextensions/file.cpp b/src/lib/corelib/jsextensions/file.cpp
index 1a6d259e4..90dae1d4c 100644
--- a/src/lib/corelib/jsextensions/file.cpp
+++ b/src/lib/corelib/jsextensions/file.cpp
@@ -141,7 +141,7 @@ QScriptValue File::js_copy(QScriptContext *context, QScriptEngine *engine)
const QString sourceFile = context->argument(0).toString();
const QString targetFile = context->argument(1).toString();
QString errorMessage;
- if (Q_UNLIKELY(!copyFileRecursion(sourceFile, targetFile, false, true, &errorMessage)))
+ if (Q_UNLIKELY(!copyFileRecursion(sourceFile, targetFile, true, true, &errorMessage)))
return context->throwError(errorMessage);
return true;
}