Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--apps/files_sharing/lib/Updater.php5
1 files changed, 5 insertions, 0 deletions
diff --git a/apps/files_sharing/lib/Updater.php b/apps/files_sharing/lib/Updater.php
index 9b5173b489c..5542a0d7c45 100644
--- a/apps/files_sharing/lib/Updater.php
+++ b/apps/files_sharing/lib/Updater.php
@@ -27,6 +27,7 @@
namespace OCA\Files_Sharing;
+use OCP\Constants;
use OCP\Share\IShare;
class Updater {
@@ -82,6 +83,10 @@ class Updater {
//Ownership is moved over
foreach ($shares as $share) {
/** @var IShare $share */
+ if (!($dstMount->getShare()->getPermissions() & Constants::PERMISSION_SHARE)) {
+ $shareManager->deleteShare($share);
+ continue;
+ }
$share->setShareOwner($newOwner);
$shareManager->updateShare($share);
}