mirror of
https://github.com/nextcloud/server.git
synced 2026-06-09 08:44:07 -04:00
Show filename in output message
Signed-off-by: Christopher Ng <chrng8@gmail.com>
This commit is contained in:
parent
e4f1d4192a
commit
cdb93e7f1d
1 changed files with 4 additions and 5 deletions
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue