Merge pull request #740 from owncloud/revert-669-master
[pub/Android/ownCloud.git] / src / com / owncloud / android / ui / activity / Uploader.java
index f249334..6c8a132 100644 (file)
@@ -170,7 +170,7 @@ public class Uploader extends SherlockListActivity implements OnItemClickListene
         case DIALOG_MULTIPLE_ACCOUNT:
             CharSequence ac[] = new CharSequence[mAccountManager.getAccountsByType(MainApp.getAccountType()).length];
             for (int i = 0; i < ac.length; ++i) {
-                ac[i] = mAccountManager.getAccountsByType(MainApp.getAccountType())[i].name;
+                ac[i] = DisplayUtils.convertIdn(mAccountManager.getAccountsByType(MainApp.getAccountType())[i].name, false);
             }
             builder.setTitle(R.string.common_choose_account);
             builder.setItems(ac, new OnClickListener() {
@@ -476,11 +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
-        if (mParents.size() > 1) {
-            while(!mStorageManager.fileExists(generatePath(mParents))){
+            while(!mStorageManager.fileExists(generatePath(mParents)) && mParents.size() > 1){
                 mParents.pop();
             }
-        }
     }