X-Git-Url: http://git.linex4red.de/pub/Android/ownCloud.git/blobdiff_plain/d252a09f53999a90036048d4db33c8b4f2f04c4f..c3d88a0594e32043b2599a37789b7ada4a9ac85a:/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 0c7e9911..25206443 100644 --- a/src/com/owncloud/android/utils/FileStorageUtils.java +++ b/src/com/owncloud/android/utils/FileStorageUtils.java @@ -76,5 +76,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