Pārlūkot izejas kodu

Fixed. App crashes when selecting an account where you have not accessed yet

jabarros 10 gadi atpakaļ
vecāks
revīzija
7283f54158

+ 4 - 2
src/com/owncloud/android/ui/activity/Uploader.java

@@ -476,8 +476,10 @@ public class Uploader extends SherlockListActivity implements OnItemClickListene
                 mParents.add(dir);
                 mParents.add(dir);
         }
         }
         //Make sure that path still exists, if it doesn't pop the stack and try the previous path
         //Make sure that path still exists, if it doesn't pop the stack and try the previous path
-        while(!mStorageManager.fileExists(generatePath(mParents))){
-            mParents.pop();
+        if (mParents.size() > 1) {
+            while(!mStorageManager.fileExists(generatePath(mParents))){
+                mParents.pop();
+            }
         }
         }
     }
     }