diff options
author | Morris Jobke <hey@morrisjobke.de> | 2015-06-24 18:38:52 +0300 |
---|---|---|
committer | Morris Jobke <hey@morrisjobke.de> | 2015-06-24 18:38:52 +0300 |
commit | f4e0b344c45f3c68c4de70b78bcb6b5f13039229 (patch) | |
tree | 2735ccc3e7cc43ada832f38332b05a4880021733 | |
parent | c000eb479b77b9ad32949ad8005065371804f83a (diff) | |
parent | d6733e9ca7f441f0a53313ad6d3bb627ebd68322 (diff) |
Merge pull request #17115 from owncloud/stable8-share-error-handling
[stable8] [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 c56af6b97e8..1fbb35de8d3 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']; |