diff options
author | Morris Jobke <hey@morrisjobke.de> | 2015-06-24 17:38:47 +0200 |
---|---|---|
committer | Morris Jobke <hey@morrisjobke.de> | 2015-06-24 17:38:47 +0200 |
commit | e2a9c7a911cefad932e8e05627a2928f593f7cb6 (patch) | |
tree | 4c11f69113cdb10a85bd61fed4cb7f60914dd116 | |
parent | e5237a2cfe6c7b0deaf629c13ce3c3b29b69fdc7 (diff) | |
parent | 81ceb00632815c7cecd694e70b06e1b65e863089 (diff) | |
download | nextcloud-server-e2a9c7a911cefad932e8e05627a2928f593f7cb6.tar.gz nextcloud-server-e2a9c7a911cefad932e8e05627a2928f593f7cb6.zip |
Merge pull request #17116 from owncloud/stable7-17115
[stable7] [sharing] handle shares of users that aren't available anymore
-rw-r--r-- | apps/files_sharing/lib/cache.php | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/apps/files_sharing/lib/cache.php b/apps/files_sharing/lib/cache.php index 57e09c979ac..16d303a1acd 100644 --- a/apps/files_sharing/lib/cache.php +++ b/apps/files_sharing/lib/cache.php @@ -22,6 +22,7 @@ namespace OC\Files\Cache; +use OC\User\NoUserException; use OCP\Share_Backend_Collection; /** @@ -53,7 +54,12 @@ class Shared_Cache extends Cache { } $source = \OC_Share_Backend_File::getSource($target, $this->storage->getMountPoint(), $this->storage->getItemType()); if (isset($source['path']) && isset($source['fileOwner'])) { - \OC\Files\Filesystem::initMountPoints($source['fileOwner']); + try { + \OC\Files\Filesystem::initMountPoints($source['fileOwner']); + } catch(NoUserException $e) { + \OC::$server->getLogger()->warning('The user \'' . $source['uid_owner'] . '\' of a share can\'t be retrieved.', array('app' => 'files_sharing')); + return false; + } $mounts = \OC\Files\Filesystem::getMountByNumericId($source['storage']); if (is_array($mounts) and !empty($mounts)) { $fullPath = $mounts[0]->getMountPoint() . $source['path']; |