Make sure the owner mountpoints are setup

This commit is contained in:
Robin Appelman 2015-04-15 18:18:28 +02:00
parent d5434c9c4e
commit 8cb40f6043
2 changed files with 5 additions and 1 deletions

View file

@ -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']);

View file

@ -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();
}