Fixed: Rotating screen after viewing a file would return you to the
[pub/Android/ownCloud.git] / src / eu / alefzero / owncloud / ui / activity / FileDisplayActivity.java
index 3310ff4..47dae5f 100644 (file)
@@ -214,6 +214,7 @@ public class FileDisplayActivity extends SherlockFragmentActivity implements
         }\r
         popDirname();\r
         mFileList.onNavigateUp();\r
+        mCurrentDir = mFileList.getCurrentFile();\r
     }\r
 \r
     @Override\r
@@ -274,6 +275,9 @@ public class FileDisplayActivity extends SherlockFragmentActivity implements
             if(!mCurrentDir.isDirectory()){\r
                 mCurrentDir = mStorageManager.getFileById(mCurrentDir.getParentId());\r
             }\r
+            \r
+            // Clear intent extra, so rotating the screen will not return us to this directory\r
+            getIntent().removeExtra(FileDetailFragment.EXTRA_FILE);\r
         } \r
                 \r
         // Drop-Down navigation and file list restore\r