Explorar el Código

Fix parent path build

Juan Carlos González Cabrero hace 9 años
padre
commit
112cb65b1f
Se han modificado 1 ficheros con 2 adiciones y 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 + "/");
     }
 
     /**