소스 검색

Fix parent path build

Juan Carlos González Cabrero 9 년 전
부모
커밋
112cb65b1f
1개의 변경된 파일2개의 추가작업 그리고 1개의 파일을 삭제
  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 + "/");
     }
 
     /**