}\r
\r
// Figure out the path where the dir needs to be created\r
- String path = FileDisplayActivity.this.mCurrentDir.getRemotePath();\r
+ String path;\r
+ if (mCurrentDir == null) {\r
+ if (!mStorageManager.fileExists("/")) {\r
+ OCFile file = new OCFile("/");\r
+ mStorageManager.saveFile(file);\r
+ mCurrentDir = mStorageManager.getFileByPath("/");\r
+ } else {\r
+ Log.wtf("FileDisplay", "OMG NO!");\r
+ return;\r
+ }\r
+ }\r
+ path = FileDisplayActivity.this.mCurrentDir.getRemotePath();\r
\r
// Create directory\r
path += directoryName + "/";\r