Remove unused imports and split long lines modified
[pub/Android/ownCloud.git] / src / com / owncloud / android / ui / activity / Uploader.java
index d0a775f..66359f3 100644 (file)
@@ -476,9 +476,9 @@ public class Uploader extends SherlockListActivity implements OnItemClickListene
                 mParents.add(dir);
         }
         //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();
-        }
+            while(!mStorageManager.fileExists(generatePath(mParents)) && mParents.size() > 1){
+                mParents.pop();
+            }
     }