mCurrentDir = mStorageManager.getFileByPath(mCurrentDir.getRemotePath()); // mCurrentDir == null if it is not in the current account\r
}\r
if (mCurrentFile != null) {\r
- mCurrentFile = mStorageManager.getFileByPath(mCurrentFile.getRemotePath()); // mCurrentFile == null if it is not in the current account\r
+ if (mCurrentFile.fileExists()) {\r
+ mCurrentFile = mStorageManager.getFileByPath(mCurrentFile.getRemotePath()); // mCurrentFile == null if it is not in the current account\r
+ } // else : keep mCurrentFile with the received value; this is currently the case of an upload in progress, when the user presses the status notification in a landscape tablet\r
}\r
\r
/// Default to root if mCurrentDir was not found\r
outState.putParcelable(FileDetailFragment.EXTRA_FILE, mCurrentDir);\r
if (mDualPane) {\r
FileDetailFragment fragment = (FileDetailFragment) getSupportFragmentManager().findFragmentByTag(FileDetailFragment.FTAG);\r
- OCFile file = fragment.getDisplayedFile();\r
- if (file != null) {\r
- outState.putParcelable(FileDetailFragment.EXTRA_FILE, file);\r
+ if (fragment != null) {\r
+ OCFile file = fragment.getDisplayedFile();\r
+ if (file != null) {\r
+ outState.putParcelable(FileDetailFragment.EXTRA_FILE, file);\r
+ }\r
}\r
}\r
Log.d(getClass().toString(), "onSaveInstanceState() end");\r
return;\r
}\r
// a new chance to get the mDownloadBinder through getFileDownloadBinder() - THIS IS A MESS\r
- mFileList.listDirectory();\r
+ if (mFileList != null)\r
+ mFileList.listDirectory();\r
if (mDualPane) {\r
FileDetailFragment fragment = (FileDetailFragment) getSupportFragmentManager().findFragmentByTag(FileDetailFragment.FTAG);\r
if (fragment != null)\r
fragment.updateFileDetails();\r
}\r
- \r
}\r
\r
@Override\r