Skip to content

Commit

Permalink
Improve occ versions:cleanup --path option
Browse files Browse the repository at this point in the history
Signed-off-by: Daniel Rudolf <github.com@daniel-rudolf.de>
  • Loading branch information
PhrozenByte committed Oct 7, 2021
1 parent c8870d0 commit 54cb4ac
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions apps/files_versions/lib/Command/CleanUp.php
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ protected function configure() {
'path',
'p',
InputOption::VALUE_REQUIRED,
'only delete versions of this path, e.g. --path="/alice/files_versions/Music"'
'only delete versions of this path, e.g. --path="/alice/files/Music"'
);
}

Expand All @@ -74,7 +74,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int

$path = $input->getOption('path');
if ($path) {
if (!preg_match('#^/([^/]+)/files_versions(/.*)?$#', $path, $pathMatches)) {
if (!preg_match('#^/([^/]+)/files(/.*)?$#', $path, $pathMatches)) {
$output->writeln("<error>Invalid path given</error>");
return 1;
}
Expand Down

0 comments on commit 54cb4ac

Please sign in to comment.