diff options
author | Daniel Kesselberg <mail@danielkesselberg.de> | 2019-02-06 20:39:15 +0100 |
---|---|---|
committer | Morris Jobke <hey@morrisjobke.de> | 2019-02-07 16:23:18 +0100 |
commit | 11a27b247fefb8739ecfcaf5ba5a3c70e364197d (patch) | |
tree | 5673028d045d108675f38e3bfc42f986feffdd77 /lib/private/Repair | |
parent | 382495e26d165c0c76616aca455ce9ba3e2df0b7 (diff) | |
download | nextcloud-server-11a27b247fefb8739ecfcaf5ba5a3c70e364197d.tar.gz nextcloud-server-11a27b247fefb8739ecfcaf5ba5a3c70e364197d.zip |
Log exception
Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
Diffstat (limited to 'lib/private/Repair')
-rw-r--r-- | lib/private/Repair/NC16/CleanupCardDAVPhotoCache.php | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/lib/private/Repair/NC16/CleanupCardDAVPhotoCache.php b/lib/private/Repair/NC16/CleanupCardDAVPhotoCache.php index 11bb765e9a4..c9c7b5cf1c0 100644 --- a/lib/private/Repair/NC16/CleanupCardDAVPhotoCache.php +++ b/lib/private/Repair/NC16/CleanupCardDAVPhotoCache.php @@ -22,11 +22,11 @@ declare(strict_types=1); namespace OC\Repair\NC16; -use OC\Files\AppData\AppData; use OCP\Files\IAppData; use OCP\Files\NotFoundException; use OCP\Files\SimpleFS\ISimpleFolder; use OCP\IConfig; +use OCP\ILogger; use OCP\Migration\IOutput; use OCP\Migration\IRepairStep; @@ -44,12 +44,16 @@ class CleanupCardDAVPhotoCache implements IRepairStep { /** @var IConfig */ private $config; - /** @var AppData */ + /** @var IAppData */ private $appData; - public function __construct(IConfig $config, IAppData $appData) { + /** @var ILogger */ + private $logger; + + public function __construct(IConfig $config, IAppData $appData, ILogger $logger) { $this->config = $config; $this->appData = $appData; + $this->logger = $logger; } public function getName(): string { @@ -78,7 +82,8 @@ class CleanupCardDAVPhotoCache implements IRepairStep { /** @var ISimpleFolder $folder */ $folder->getFile('photo.')->delete(); } catch (\Exception $e) { - $output->warning('Could not delete "photo." file in dav-photocache/' . $folder->getName()); + $this->logger->logException($e); + $output->warning('Could not delete file "dav-photocache/' . $folder->getName() . '/photo."'); } } } |