diff options
author | Vincent Petry <pvince81@owncloud.com> | 2014-07-02 21:01:03 +0200 |
---|---|---|
committer | Vincent Petry <pvince81@owncloud.com> | 2014-07-02 21:01:03 +0200 |
commit | ed29e7d1606ae073ab156ab1bf086ddec2b94bb3 (patch) | |
tree | 1b7170cfea5291f1b0bd774a73ec45c5f0108392 /apps/files_sharing | |
parent | f1f66ff686a6b419fa06c11ecc0797238e45c7e2 (diff) | |
parent | bb935978fa1af1dd304bf2a5aad4d135dfea8268 (diff) | |
download | nextcloud-server-ed29e7d1606ae073ab156ab1bf086ddec2b94bb3.tar.gz nextcloud-server-ed29e7d1606ae073ab156ab1bf086ddec2b94bb3.zip |
Merge pull request #9329 from owncloud/sharing_check_target
don't move a share mount point into a different mount point
Diffstat (limited to 'apps/files_sharing')
-rw-r--r-- | apps/files_sharing/lib/external/mount.php | 1 | ||||
-rw-r--r-- | apps/files_sharing/lib/helper.php | 1 | ||||
-rw-r--r-- | apps/files_sharing/lib/sharedmount.php | 10 |
3 files changed, 2 insertions, 10 deletions
diff --git a/apps/files_sharing/lib/external/mount.php b/apps/files_sharing/lib/external/mount.php index a42a12f9b9a..e564dded69a 100644 --- a/apps/files_sharing/lib/external/mount.php +++ b/apps/files_sharing/lib/external/mount.php @@ -38,6 +38,7 @@ class Mount extends \OC\Files\Mount\Mount implements MoveableMount { public function moveMount($target) { $result = $this->manager->setMountPoint($this->mountPoint, $target); $this->setMountPoint($target); + return $result; } diff --git a/apps/files_sharing/lib/helper.php b/apps/files_sharing/lib/helper.php index 0b3433576f6..c15b1d48114 100644 --- a/apps/files_sharing/lib/helper.php +++ b/apps/files_sharing/lib/helper.php @@ -236,4 +236,5 @@ class Helper { $result = $appConfig->getValue('files_sharing', 'incoming_server2server_share_enabled', 'yes'); return ($result === 'yes') ? true : false; } + } diff --git a/apps/files_sharing/lib/sharedmount.php b/apps/files_sharing/lib/sharedmount.php index 8d0ecbc6789..f8def2c6a82 100644 --- a/apps/files_sharing/lib/sharedmount.php +++ b/apps/files_sharing/lib/sharedmount.php @@ -8,10 +8,8 @@ namespace OCA\Files_Sharing; -use OC\Files\Filesystem; use OC\Files\Mount\Mount; use OC\Files\Mount\MoveableMount; -use OC\Files\Storage\Shared; /** * Shared mount points can be moved by the user @@ -119,14 +117,6 @@ class SharedMount extends Mount implements MoveableMount { * @return bool */ public function moveMount($target) { - // it shouldn't be possible to move a Shared storage into another one - list($targetStorage,) = Filesystem::resolvePath($target); - if ($targetStorage instanceof Shared) { - \OCP\Util::writeLog('file sharing', - 'It is not allowed to move one mount point into another one', - \OCP\Util::DEBUG); - return false; - } $relTargetPath = $this->stripUserFilesPath($target); $share = $this->storage->getShare(); |