diff options
author | Christopher Ng <chrng8@gmail.com> | 2022-03-29 23:08:47 +0000 |
---|---|---|
committer | Christopher Ng <chrng8@gmail.com> | 2022-03-29 23:12:52 +0000 |
commit | cdb93e7f1d05c95f9c441aa5e84a2089488b22c6 (patch) | |
tree | 699ff78d2e560bbb2520ff2bf184d6983d6deb42 /apps/dav/lib/UserMigration | |
parent | e4f1d4192aec29cb8a083fb3e64cd03fcb0162b8 (diff) | |
download | nextcloud-server-cdb93e7f1d05c95f9c441aa5e84a2089488b22c6.tar.gz nextcloud-server-cdb93e7f1d05c95f9c441aa5e84a2089488b22c6.zip |
Show filename in output message
Signed-off-by: Christopher Ng <chrng8@gmail.com>
Diffstat (limited to 'apps/dav/lib/UserMigration')
-rw-r--r-- | apps/dav/lib/UserMigration/CalendarMigrator.php | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/apps/dav/lib/UserMigration/CalendarMigrator.php b/apps/dav/lib/UserMigration/CalendarMigrator.php index 8d2f493555f..16b21314610 100644 --- a/apps/dav/lib/UserMigration/CalendarMigrator.php +++ b/apps/dav/lib/UserMigration/CalendarMigrator.php @@ -321,7 +321,7 @@ class CalendarMigrator implements IMigrator { /** * @throws InvalidCalendarException */ - private function importCalendarObject(int $calendarId, VCalendar $vCalendarObject, OutputInterface $output): void { + private function importCalendarObject(int $calendarId, VCalendar $vCalendarObject, string $filename, OutputInterface $output): void { try { $this->calDavBackend->createCalendarObject( $calendarId, @@ -330,8 +330,7 @@ class CalendarMigrator implements IMigrator { CalDavBackend::CALENDAR_TYPE_CALENDAR, ); } catch (Throwable $e) { - // Rollback creation of calendar on error - $output->writeln('Error creating calendar object, rolling back creation of calendar…'); + $output->writeln("Error creating calendar object, rolling back creation of \"$filename\" calendar…"); $this->calDavBackend->deleteCalendar($calendarId, true); throw new InvalidCalendarException(); } @@ -396,7 +395,7 @@ class CalendarMigrator implements IMigrator { $vCalendarObject->add($component); } } - $this->importCalendarObject($calendarId, $vCalendarObject, $output); + $this->importCalendarObject($calendarId, $vCalendarObject, $filename, $output); } foreach ($ungroupedCalendarComponents as $component) { @@ -405,7 +404,7 @@ class CalendarMigrator implements IMigrator { foreach ($this->getRequiredImportComponents($vCalendar, $component) as $component) { $vCalendarObject->add($component); } - $this->importCalendarObject($calendarId, $vCalendarObject, $output); + $this->importCalendarObject($calendarId, $vCalendarObject, $filename, $output); } } |