فهرست منبع

Refactor the check of last character of an OCFile parent path

Juan Carlos González Cabrero 9 سال پیش
والد
کامیت
bd96e2c9ce
1فایلهای تغییر یافته به همراه1 افزوده شده و 1 حذف شده
  1. 1 1
      src/com/owncloud/android/datamodel/OCFile.java

+ 1 - 1
src/com/owncloud/android/datamodel/OCFile.java

@@ -444,7 +444,7 @@ public class OCFile implements Parcelable, Comparable<OCFile> {
      */
     public String getParentRemotePath() {
         String parentPath = new File(getRemotePath()).getParent();
-        return (parentPath.substring(parentPath.length() - 1).equals("/")) ? parentPath : (parentPath + "/");
+        return (parentPath.endsWith("/")) ? parentPath : (parentPath + "/");
     }
 
     /**