summaryrefslogtreecommitdiffstats
path: root/src/corelib/io/qfilesystemengine_symbian.cpp
diff options
context:
space:
mode:
authorShane Kearns <shane.kearns@accenture.com>2010-10-12 17:38:24 +0100
committerShane Kearns <shane.kearns@accenture.com>2010-10-18 14:37:08 +0100
commit0aa70ec7195e7a6ee07f73ac3c37030c9d37b132 (patch)
tree264d468bca1c28705dadcbd22448b830863f0241 /src/corelib/io/qfilesystemengine_symbian.cpp
parentec1c89a9440cefc0ebea225d3aeca2decb56e690 (diff)
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/corelib/io/qfilesystemengine_symbian.cpp')
-rw-r--r--src/corelib/io/qfilesystemengine_symbian.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/corelib/io/qfilesystemengine_symbian.cpp b/src/corelib/io/qfilesystemengine_symbian.cpp
index d0682483b0..e2dfe533f6 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;
}