Browse Source

Fix parent path build

Juan Carlos González Cabrero 9 years ago
parent
commit
112cb65b1f
1 changed files with 2 additions and 1 deletions
  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 + "/");
     }
 
     /**