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();
+ if (mParents.size() > 1) {
+ while(!mStorageManager.fileExists(generatePath(mParents))){
+ mParents.pop();
+ }
}
}