summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorTobia De Koninck <LEDfan@users.noreply.github.com>2020-01-03 08:50:37 +0100
committerBackportbot <backportbot-noreply@rullzer.com>2020-02-03 15:00:03 +0000
commitc3092fda9a17e035daff1ab4baf5e183a27c39e1 (patch)
tree49e5c97880ec3ce28a53ab69d9e694d7fc7308e3 /apps
parent6cc23b170a326d7fee7afc521cef9282ce776fe4 (diff)
downloadnextcloud-server-c3092fda9a17e035daff1ab4baf5e183a27c39e1.tar.gz
nextcloud-server-c3092fda9a17e035daff1ab4baf5e183a27c39e1.zip
Catch \Error in Transfer::restoreShares
This makes the command more fault tolerant. An \Error can happen when e.g. the owner of a share is null. If we don't catch this, the restore process will stop in an unknown state. Signed-off-by: Tobia De Koninck <LEDfan@users.noreply.github.com>
Diffstat (limited to 'apps')
-rw-r--r--apps/files/lib/Service/OwnershipTransferService.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/apps/files/lib/Service/OwnershipTransferService.php b/apps/files/lib/Service/OwnershipTransferService.php
index 3dc55615c95..b130910e25b 100644
--- a/apps/files/lib/Service/OwnershipTransferService.php
+++ b/apps/files/lib/Service/OwnershipTransferService.php
@@ -286,7 +286,7 @@ class OwnershipTransferService {
}
} catch (\OCP\Files\NotFoundException $e) {
$output->writeln('<error>Share with id ' . $share->getId() . ' points at deleted file, skipping</error>');
- } catch (\Exception $e) {
+ } catch (\Throwable $e) {
$output->writeln('<error>Could not restore share with id ' . $share->getId() . ':' . $e->getTraceAsString() . '</error>');
}
$progress->advance();