Skip to content

Commit

Permalink
Merge pull request #19998 from owncloud/backport-fix-deleted-ldap-use…
Browse files Browse the repository at this point in the history
…r-sharing-stable8.1

[8.1] handle NoUserException in sharing code
  • Loading branch information
DeepDiver1975 committed Oct 23, 2015
2 parents 9daf3e7 + e3642f2 commit 5062007
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion apps/files_sharing/lib/cache.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@

namespace OC\Files\Cache;

use OC\User\NoUserException;
use OCP\Share_Backend_Collection;

/**
Expand Down Expand Up @@ -62,7 +63,12 @@ private function getSourceCache($target) {
}
$source = \OC_Share_Backend_File::getSource($target, $this->storage->getShare());
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()->logException($e, ['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'];
Expand Down

0 comments on commit 5062007

Please sign in to comment.