projects
/
pub
/
Android
/
ownCloud.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
OC-2735: Refresh unshare files in list
[pub/Android/ownCloud.git]
/
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
c588ec1
..
69fa596
100644
(file)
--- 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
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());
if (share != null) {
UnshareLinkRemoteOperation operation = new UnshareLinkRemoteOperation((int) share.getIdRemoteShared());