Merge branch 'develop' into refactor_remote_operation_to_create_folder
[pub/Android/ownCloud.git] / src / com / owncloud / android / utils / FileStorageUtils.java
index 0c7e991..2520644 100644 (file)
@@ -76,5 +76,11 @@ public class FileStorageUtils {
         String value = uploadPath + OCFile.PATH_SEPARATOR +  (fileName == null ? "" : fileName);
         return value;
     }
         String value = uploadPath + OCFile.PATH_SEPARATOR +  (fileName == null ? "" : fileName);
         return value;
     }
+    
+    public static String getParentPath(String remotePath) {
+        String parentPath = new File(remotePath).getParent();
+        parentPath = parentPath.endsWith(OCFile.PATH_SEPARATOR) ? parentPath : parentPath + OCFile.PATH_SEPARATOR;
+        return parentPath;
+    }
   
 }
\ No newline at end of file
   
 }
\ No newline at end of file