diff options
author | Shane Kearns <shane.kearns@accenture.com> | 2010-10-12 16:38:24 (GMT) |
---|---|---|
committer | Shane Kearns <shane.kearns@accenture.com> | 2010-10-18 13:37:08 (GMT) |
commit | 0aa70ec7195e7a6ee07f73ac3c37030c9d37b132 (patch) | |
tree | 264d468bca1c28705dadcbd22448b830863f0241 /src | |
parent | ec1c89a9440cefc0ebea225d3aeca2decb56e690 (diff) | |
download | Qt-0aa70ec7195e7a6ee07f73ac3c37030c9d37b132.zip Qt-0aa70ec7195e7a6ee07f73ac3c37030c9d37b132.tar.gz Qt-0aa70ec7195e7a6ee07f73ac3c37030c9d37b132.tar.bz2 |
Fix for QFile::copy failing silently with relative paths
CFileMan doesn't support . and .. in relative paths.
Therefore, paths are converted to absolute first.
Also, the error was being ignored which has been fixed.
Reviewed-By: joao
Diffstat (limited to 'src')
-rw-r--r-- | src/corelib/io/qfilesystemengine_symbian.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/corelib/io/qfilesystemengine_symbian.cpp b/src/corelib/io/qfilesystemengine_symbian.cpp index d068248..e2dfe53 100644 --- a/src/corelib/io/qfilesystemengine_symbian.cpp +++ b/src/corelib/io/qfilesystemengine_symbian.cpp @@ -302,10 +302,11 @@ bool QFileSystemEngine::copyFile(const QFileSystemEntry &source, const QFileSyst CFileMan *fm = 0; TRAPD(err, fm = CFileMan::NewL(qt_s60GetRFs())); if (err == KErrNone) { - err = fm->Copy(qt_QString2TPtrC(source.nativeFilePath()), qt_QString2TPtrC(target.nativeFilePath()), 0); + err = fm->Copy(qt_QString2TPtrC(absoluteName(source).nativeFilePath()), qt_QString2TPtrC(absoluteName(target).nativeFilePath()), 0); delete fm; - return true; } + if (err == KErrNone) + return true; error = QSystemError(err, QSystemError::NativeError); return false; } |