TBuf< KMaxPath > pathWithoutDrive;
TBuf< KMaxPath > driveAndPath;
TBuf< 2 > appDrive;
RFs fsSession;
User::LeaveIfError(fsSession.Connect());
CleanupClosePushL(fsSession);
// Private Path Without Drive
fsSession.PrivatePath( pathWithoutDrive );
// Extract drive letter into appDrive:
appDrive.Copy(Application()->AppFullName().Left(2));
// Combine drive letter and private path
driveAndPath.Copy(appDrive);
driveAndPath.Append(pathWithoutDrive);
driveAndPath.Append(_L("MyFolder"));
BaflUtils::EnsurePathExistsL(fsSession,driveAndPath);
(Error Here. I checked driveAndPath in debugger and that is OK. However drive letter is z: on emulator)
CleanupStack::PopAndDestroy(&fsSession);