summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2015-06-23 09:42:42 +0200
committerMorris Jobke <hey@morrisjobke.de>2015-06-23 11:34:30 +0200
commite6bf1ca7b302514e6e138438a8eec37dee28c908 (patch)
tree89ba154eaa9b1c6a6cc4bf866686e2585168253d
parent6ee4fe56db31bd193d27f046ac70f3ceec62b818 (diff)
downloadnextcloud-server-e6bf1ca7b302514e6e138438a8eec37dee28c908.tar.gz
nextcloud-server-e6bf1ca7b302514e6e138438a8eec37dee28c908.zip
skip users that are not available anymore during sharing upgrade
-rw-r--r--apps/files_sharing/appinfo/update.php8
1 files changed, 7 insertions, 1 deletions
diff --git a/apps/files_sharing/appinfo/update.php b/apps/files_sharing/appinfo/update.php
index e393b1575af..2d2d78a6454 100644
--- a/apps/files_sharing/appinfo/update.php
+++ b/apps/files_sharing/appinfo/update.php
@@ -87,8 +87,14 @@ function removeSharedFolder($mkdirs = true, $chunkSize = 99) {
// create folder Shared for each user
if ($mkdirs) {
+ $logger = \OC::$server->getLogger();
foreach ($unique_users as $user) {
- \OC\Files\Filesystem::initMountPoints($user);
+ try {
+ \OC\Files\Filesystem::initMountPoints($user);
+ } catch(\OC\User\NoUserException $e) {
+ $logger->warning("Update: removeSharedFolder - user '$user' is not present anymore" , array('app' => 'files_sharing'));
+ continue;
+ }
if (!$view->file_exists('/' . $user . '/files/Shared')) {
$view->mkdir('/' . $user . '/files/Shared');
}