diff --git a/apps/files_sharing/lib/mountprovider.php b/apps/files_sharing/lib/mountprovider.php index 0ba44ec7a9..9f18ef737b 100644 --- a/apps/files_sharing/lib/mountprovider.php +++ b/apps/files_sharing/lib/mountprovider.php @@ -8,6 +8,7 @@ namespace OCA\Files_Sharing; +use OC\Files\Filesystem; use OCA\Files_Sharing\Propagation\PropagationManager; use OCP\Files\Config\IMountProvider; use OCP\Files\Storage\IStorageFactory; @@ -50,6 +51,7 @@ class MountProvider implements IMountProvider { return $share['permissions'] > 0; }); return array_map(function ($share) use ($user, $storageFactory) { + Filesystem::initMountPoints($share['uid_owner']); // for updating etags for the share owner when we make changes to this share. $ownerPropagator = $this->propagationManager->getChangePropagator($share['uid_owner']); diff --git a/apps/files_sharing/lib/sharedmount.php b/apps/files_sharing/lib/sharedmount.php index fbf8d05c1b..8c473e1f1c 100644 --- a/apps/files_sharing/lib/sharedmount.php +++ b/apps/files_sharing/lib/sharedmount.php @@ -25,6 +25,7 @@ namespace OCA\Files_Sharing; use OC\Files\Mount\MountPoint; use OC\Files\Mount\MoveableMount; +use OC\Files\View; /** * Shared mount points can be moved by the user @@ -55,8 +56,9 @@ class SharedMount extends MountPoint implements MoveableMount { $mountPoint = basename($share['file_target']); $parent = dirname($share['file_target']); + $view = new View('/' . $user . '/files'); - if (!\OC\Files\Filesystem::is_dir($parent)) { + if (!$view->is_dir($parent)) { $parent = Helper::getShareFolder(); }