From 001c01e91d9c6cc724a374fcb8371a0551b21958 Mon Sep 17 00:00:00 2001 From: Shane Kearns Date: Mon, 17 Oct 2011 15:47:42 +0100 Subject: Symbian - Change working directory of applications in ROM Working directory (as opposed to applicationDirPath) was on the Z drive before, change it to be the same. Task-Number: QTBUG-22024 Reviewed-By: mread --- src/corelib/kernel/qcore_symbian_p.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/corelib/kernel/qcore_symbian_p.cpp b/src/corelib/kernel/qcore_symbian_p.cpp index 57ae2af..4f953a7 100644 --- a/src/corelib/kernel/qcore_symbian_p.cpp +++ b/src/corelib/kernel/qcore_symbian_p.cpp @@ -121,18 +121,17 @@ public: TInt err = iFs.CreatePrivatePath(sysdrive); if (err != KErrNone && err != KErrAlreadyExists) qWarning("Failed to create private path on system drive."); - //BC with 4.7: set working directory to same drive as application TFileName pfn = RProcess().FileName(); TInt drive; if (pfn.Length() > 0 && iFs.CharToDrive(pfn[0], drive) == KErrNone) { - // for system drive or rom based apps, leave the path on system drive + //BC with 4.7: create private path on application drive (except rom or system drive which is done above) if (drive != sysdrive && drive != EDriveZ) { err = iFs.CreatePrivatePath(drive); - if (err == KErrNone || err == KErrAlreadyExists) - iFs.SetSessionToPrivate(drive); - else + if (err != KErrNone && err != KErrAlreadyExists) qWarning("Failed to create private path on application drive."); } + //BC with 4.7: set working directory to same drive as application + iFs.SetSessionToPrivate(drive); } } -- cgit v0.12