1
0
mirror of https://github.com/owncloud/android-library.git synced 2025-06-07 16:06:08 +00:00

Added extra validation to avoid interference of shares not of public type (unhandled by the moment)

This commit is contained in:
David A. Velasco 2014-02-20 14:46:46 +01:00
parent 9a3ad5a4ec
commit b3ac14f575

View File

@ -243,6 +243,7 @@ public class ShareXMLParser {
}
if (share != null) {
// this is the response of a request for creation; don't pass to isValidShare()
shares.add(share);
}
@ -337,7 +338,9 @@ public class ShareXMLParser {
}
private boolean isValidShare(OCShare share) {
return (share.getIdRemoteShared() > -1);
return ((share.getIdRemoteShared() > -1) &&
(share.getShareType() == ShareType.PUBLIC_LINK) // at this moment we only care about public shares
);
}
private void fixPathForFolder(OCShare share) {