X-Git-Url: http://git.linex4red.de/pub/Android/ownCloud.git/blobdiff_plain/8d493de0ea590d669dadad7f2fe6d22fd72f9cb5..a8b46b7d95bf9cfc8fd09fa5eff1229dcc6d5208:/src/com/owncloud/android/operations/UnshareLinkOperation.java diff --git a/src/com/owncloud/android/operations/UnshareLinkOperation.java b/src/com/owncloud/android/operations/UnshareLinkOperation.java index c588ec1a..69fa5961 100644 --- a/src/com/owncloud/android/operations/UnshareLinkOperation.java +++ b/src/com/owncloud/android/operations/UnshareLinkOperation.java @@ -47,7 +47,11 @@ public class UnshareLinkOperation extends SyncOperation { RemoteOperationResult result = null; // Get Share for a file - OCShare share = getStorageManager().getShareByPath(mFile.getRemotePath()); + String path = mFile.getRemotePath(); + if (mFile.isFolder()) { + path = path.substring(0, path.length()-1); // Remove last / + } + OCShare share = getStorageManager().getShareByPath(path); if (share != null) { UnshareLinkRemoteOperation operation = new UnshareLinkRemoteOperation((int) share.getIdRemoteShared());