X-Git-Url: http://git.linex4red.de/pub/Android/ownCloud.git/blobdiff_plain/a0efedc99d0421554b8f8e93ef631e54a4cb05cd..e1245bbda7894e1a3028d2b54a6918e4bdd46ae2:/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