Explorar o código

Fix parent path build

Juan Carlos González Cabrero %!s(int64=9) %!d(string=hai) anos
pai
achega
112cb65b1f
Modificáronse 1 ficheiros con 2 adicións e 1 borrados
  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 + "/");
     }
 
     /**