Improve occ versions:cleanup --path option

Signed-off-by: Daniel Rudolf <github.com@daniel-rudolf.de>
pull/27408/head
Daniel Rudolf 4 years ago
parent c8870d0756
commit 54cb4ac840
No known key found for this signature in database
GPG Key ID: A061F02CD8DE4538
  1. 4
      apps/files_versions/lib/Command/CleanUp.php

@ -64,7 +64,7 @@ class CleanUp extends Command {
'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"'
);
}
@ -74,7 +74,7 @@ class CleanUp extends Command {
$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;
}

Loading…
Cancel
Save