X-Git-Url: http://git.linex4red.de/pub/Android/ownCloud.git/blobdiff_plain/31f6e61f894efd0867d1a34c8d3cb53d7bb5fc4a..6da5d3c212d80042e07c29e9cedbf40643039b4b:/src/com/owncloud/android/utils/FileStorageUtils.java diff --git a/src/com/owncloud/android/utils/FileStorageUtils.java b/src/com/owncloud/android/utils/FileStorageUtils.java index 55399525..e221de5f 100644 --- a/src/com/owncloud/android/utils/FileStorageUtils.java +++ b/src/com/owncloud/android/utils/FileStorageUtils.java @@ -75,5 +75,11 @@ public class FileStorageUtils { 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