MC: Updated comment only
[pub/Android/ownCloud.git] / src / com / owncloud / android / utils / FileStorageUtils.java
index e70302f..3983771 100644 (file)
@@ -46,12 +46,12 @@ import android.webkit.MimeTypeMap;
  * Static methods to help in access to local file system.
  */
 public class FileStorageUtils {
  * Static methods to help in access to local file system.
  */
 public class FileStorageUtils {
-    public static Integer mSortOrder;
-    public static Boolean mSortAscending;
     public static final Integer SORT_NAME = 0;
     public static final Integer SORT_DATE = 1;
     public static final Integer SORT_SIZE = 2;
     public static final Integer SORT_NAME = 0;
     public static final Integer SORT_DATE = 1;
     public static final Integer SORT_SIZE = 2;
-  
+    public static Integer mSortOrder = SORT_NAME;
+    public static Boolean mSortAscending = true;
+
     
     //private static final String LOG_TAG = "FileStorageUtils";
 
     
     //private static final String LOG_TAG = "FileStorageUtils";
 
@@ -254,7 +254,7 @@ public class FileStorageUtils {
         Collections.sort(files, new Comparator<OCFile>() {
             public int compare(OCFile o1, OCFile o2) {
                 if (o1.isFolder() && o2.isFolder()) {
         Collections.sort(files, new Comparator<OCFile>() {
             public int compare(OCFile o1, OCFile o2) {
                 if (o1.isFolder() && o2.isFolder()) {
-                    return val * o1.getRemotePath().toLowerCase().compareTo(o2.getRemotePath().toLowerCase());
+                    return val * new AlphanumComparator().compare(o1, o2);
                 } else if (o1.isFolder()) {
                     return -1;
                 } else if (o2.isFolder()) {
                 } else if (o1.isFolder()) {
                     return -1;
                 } else if (o2.isFolder()) {