Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTobia De Koninck <LEDfan@users.noreply.github.com>2020-01-03 10:50:37 +0300
committerRoeland Jago Douma <roeland@famdouma.nl>2020-02-03 13:15:56 +0300
commit055ae9b2cd9f37f854d3c8c4f7e2051cd116fa53 (patch)
treea0e1abd57a7ccea6295f5291fe3d2f08712d879d
parent97508f69ec5046c3876912b80530c7a164ce49f9 (diff)
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>
-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();