Browse Source

Fix parent path build

Juan Carlos González Cabrero 9 năm trước cách đây
mục cha
commit
112cb65b1f
1 tập tin đã thay đổi với 2 bổ sung1 xóa
  1. 2 1
      src/com/owncloud/android/datamodel/OCFile.java

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

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