Added exception logging
[pub/Android/ownCloud.git] / src / com / owncloud / android / datamodel / OCFile.java
index bd8e0d4..70df2b2 100644 (file)
@@ -26,6 +26,7 @@ import com.owncloud.android.lib.common.utils.Log_OC;
 
 import java.io.File;
 
+import third_parties.daveKoeller.AlphanumComparator;
 public class OCFile implements Parcelable, Comparable<OCFile> {
 
     public static final Parcelable.Creator<OCFile> CREATOR = new Parcelable.Creator<OCFile>() {
@@ -458,7 +459,7 @@ public class OCFile implements Parcelable, Comparable<OCFile> {
         } else if (another.isFolder()) {
             return 1;
         }
-        return getRemotePath().toLowerCase().compareTo(another.getRemotePath().toLowerCase());
+        return new AlphanumComparator().compare(this, another);
     }
 
     @Override
@@ -539,8 +540,7 @@ public class OCFile implements Parcelable, Comparable<OCFile> {
      * @return 'True' if the file is simple text (e.g. not application-dependent, like .doc or .docx)
      */
     public boolean isText() {
-        return !isFolder() && !isAudio() && !isVideo() && !isImage() && ((mMimeType != null && mMimeType.startsWith("text/")) ||
-                getMimeTypeFromName().startsWith("text/"));
+        return ((mMimeType != null && mMimeType.startsWith("text/")) || getMimeTypeFromName().startsWith("text/"));
     }
 
     public String getMimeTypeFromName() {