Fixed duplication of some files in local database due to differences in remote and...
[pub/Android/ownCloud.git] / src / eu / alefzero / owncloud / ui / activity / FileDisplayActivity.java
index d19cd3c..ec4def4 100644 (file)
@@ -106,7 +106,7 @@ public class FileDisplayActivity extends SherlockFragmentActivity implements
 \r
         // TODO: fix hack: workaround for bug in actionbar sherlock\r
         // it always shows indeterminate progress bar\r
-        if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.ICE_CREAM_SANDWICH) {\r
+        if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.HONEYCOMB) {\r
             requestWindowFeature(Window.FEATURE_INDETERMINATE_PROGRESS);\r
             setProgressBarIndeterminateVisibility(false);\r
         }\r
@@ -417,14 +417,12 @@ public class FileDisplayActivity extends SherlockFragmentActivity implements
                             // Figure out the path where the dir needs to be created\r
                             String path;\r
                             if (mCurrentDir == null) {\r
+                                // this is just a patch; we should ensure that mCurrentDir never is 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
+                                mCurrentDir = mStorageManager.getFileByPath("/");\r
                             }\r
                             path = FileDisplayActivity.this.mCurrentDir.getRemotePath();\r
                             \r