commonuis/CommonDialogs/src/CAknFileSelectionEventHandler.cpp
branchRCL_3
changeset 18 0aa5fbdfbc30
parent 16 71dd06cfe933
child 55 aecbbf00d063
--- a/commonuis/CommonDialogs/src/CAknFileSelectionEventHandler.cpp	Wed Apr 14 16:14:00 2010 +0300
+++ b/commonuis/CommonDialogs/src/CAknFileSelectionEventHandler.cpp	Tue Apr 27 16:55:05 2010 +0300
@@ -296,17 +296,17 @@
         {
         case ERightSoftkeyPress: // USER HAS HIT RIGHT SOFTKEY
             {
-            while( iModel->DirectoryLevel() > 0 ) // Find until existing contents
-                {
-                entries = iModel->GotoParentFolderL();
-                PopIndices( aTopItemIndex, aFocusedItemIndex );
-                if( entries > 0 || entries < KErrNotFound )
-                    {
-                    break;
-                    }
-                }
             if( iModel->DirectoryLevel() > 0 ) // We are not in the root folder
                 {
+                while( iModel->DirectoryLevel() > 0 ) // Find until existing contents
+                    {
+                    entries = iModel->GotoParentFolderL();
+                    PopIndices( aTopItemIndex, aFocusedItemIndex );
+                    if( entries > 0 || entries < KErrNotFound )
+                        {
+                        break;
+                        }
+                    }
                 if( entries > 0 )
                     {
                     if (aFocusedItemIndex >= entries)
@@ -316,6 +316,10 @@
                     UpdateSoftkeysL( aFocusedItemIndex, aContainer );
                     returnType = EItemsUpdated;
                     }
+                else
+                    {
+                    returnType = ETryingToExit;
+                    }
                 }
             else // We are in the root folder
                 {