diff --git a/apps/files/lib/Command/SanitizeFilenames.php b/apps/files/lib/Command/SanitizeFilenames.php index a404f0b3fd9d5..a06b820ee6c39 100644 --- a/apps/files/lib/Command/SanitizeFilenames.php +++ b/apps/files/lib/Command/SanitizeFilenames.php @@ -137,8 +137,9 @@ private function sanitizeFiles(Folder $folder): void { $this->output->writeln('skipping: ' . $node->getPath() . ' (file is locked)'); } catch (NotPermittedException) { $this->output->writeln('skipping: ' . $node->getPath() . ' (no permissions)'); - } catch (Exception) { + } catch (Exception $error) { $this->output->writeln('failed: ' . $node->getPath() . ''); + $this->output->writeln('' . $error->getMessage() . '', OutputInterface::OUTPUT_NORMAL | OutputInterface::VERBOSITY_VERBOSE); } if ($node instanceof Folder) {