tobiasKaminsky 10 years ago
parent
commit
580c1f008e
1 changed files with 11 additions and 6 deletions
  1. 11 6
      src/com/owncloud/android/ui/fragment/OCFileListFragment.java

+ 11 - 6
src/com/owncloud/android/ui/fragment/OCFileListFragment.java

@@ -420,14 +420,19 @@ public class OCFileListFragment extends ExtendedListFragment {
         String output = "";
 
         if (folders == 1) {
-            output = folders.toString() + " " + getResources().getString(R.string.file_list_folder) + ", ";
+            output = folders.toString() + " " + getResources().getString(R.string.file_list_folder);
         } else if (folders > 1) {
-            output = folders.toString() + " " + getResources().getString(R.string.file_list_folders) + ", ";
+            output = folders.toString() + " " + getResources().getString(R.string.file_list_folders);
         }
-        if (files == 1) {
-            output = output + files.toString() + " " + getResources().getString(R.string.file_list_file);
-        } else {
-            output = output + files.toString() + " " + getResources().getString(R.string.file_list_files);
+        if (folders > 0 && files > 0){
+            output = output + ", ";
+        }
+        if (files > 0){
+            if (files == 1) {
+                output = output + files.toString() + " " + getResources().getString(R.string.file_list_file);
+            } else {
+                output = output + files.toString() + " " + getResources().getString(R.string.file_list_files);
+            }
         }
         return output;
     }