From 0aa70ec7195e7a6ee07f73ac3c37030c9d37b132 Mon Sep 17 00:00:00 2001 From: Shane Kearns Date: Tue, 12 Oct 2010 17:38:24 +0100 Subject: 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 --- src/corelib/io/qfilesystemengine_symbian.cpp | 5 +++-- 1 file 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; } -- cgit v0.12