summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/private/share/share.php9
1 files changed, 6 insertions, 3 deletions
diff --git a/lib/private/share/share.php b/lib/private/share/share.php
index 2dc83bdcc45..2a9fa44f78d 100644
--- a/lib/private/share/share.php
+++ b/lib/private/share/share.php
@@ -253,9 +253,6 @@ class Share extends Constants {
// Include owner in list of users, if requested
if ($includeOwner) {
$shares[] = $ownerUser;
- if ($returnUserPaths) {
- $sharePaths[$ownerUser] = $path;
- }
}
if ($returnUserPaths) {
@@ -283,6 +280,12 @@ class Share extends Constants {
}
}
+ if ($includeOwner) {
+ $sharePaths[$ownerUser] = $path;
+ } else {
+ unset($sharePaths[$ownerUser]);
+ }
+
return $sharePaths;
}