aboutsummaryrefslogtreecommitdiffstats
path: root/apps/files/lib/Command
diff options
context:
space:
mode:
authorJasper Weyne <jasperweyne@gmail.com>2022-08-11 08:54:08 +0200
committerGitHub <noreply@github.com>2022-08-11 08:54:08 +0200
commit44f6c931e7c9c74ea4f448d3cdfbaa89f3b7c379 (patch)
tree710a8c1bd1c20c685991de146aa9ef149ec1de7a /apps/files/lib/Command
parent0633a1d9f5a7ef06d577ae6556d09db9e94f5684 (diff)
parenta61331f4560468e6d433cf32e008b157b06e7ea9 (diff)
downloadnextcloud-server-44f6c931e7c9c74ea4f448d3cdfbaa89f3b7c379.tar.gz
nextcloud-server-44f6c931e7c9c74ea4f448d3cdfbaa89f3b7c379.zip
Merge branch 'master' into patch-2
Diffstat (limited to 'apps/files/lib/Command')
-rw-r--r--apps/files/lib/Command/RepairTree.php2
-rw-r--r--apps/files/lib/Command/Scan.php4
2 files changed, 3 insertions, 3 deletions
diff --git a/apps/files/lib/Command/RepairTree.php b/apps/files/lib/Command/RepairTree.php
index 96f114735d6..4fe64ef0edf 100644
--- a/apps/files/lib/Command/RepairTree.php
+++ b/apps/files/lib/Command/RepairTree.php
@@ -68,7 +68,7 @@ class RepairTree extends Command {
->where($query->expr()->eq('fileid', $query->createParameter('fileid')));
foreach ($rows as $row) {
- $output->writeln("Path of file ${row['fileid']} is ${row['path']} but should be ${row['parent_path']}/${row['name']} based on it's parent", OutputInterface::VERBOSITY_VERBOSE);
+ $output->writeln("Path of file {$row['fileid']} is {$row['path']} but should be {$row['parent_path']}/{$row['name']} based on it's parent", OutputInterface::VERBOSITY_VERBOSE);
if ($fix) {
$fileId = $this->getFileId((int)$row['parent_storage'], $row['parent_path'] . '/' . $row['name']);
diff --git a/apps/files/lib/Command/Scan.php b/apps/files/lib/Command/Scan.php
index 47f1caabc78..b40e963efc6 100644
--- a/apps/files/lib/Command/Scan.php
+++ b/apps/files/lib/Command/Scan.php
@@ -144,7 +144,7 @@ class Scan extends Base {
$scanner->scan($path, $recursive, $homeOnly ? [$this, 'filterHomeMount'] : null);
}
} catch (ForbiddenException $e) {
- $output->writeln("<error>Home storage for user $user not writable</error>");
+ $output->writeln("<error>Home storage for user $user not writable or 'files' subdirectory missing</error>");
$output->writeln('Make sure you\'re running the scan command only as the user the web server runs as');
} catch (InterruptedException $e) {
# exit the function if ctrl-c has been pressed
@@ -291,7 +291,7 @@ class Scan extends Base {
protected function formatExecTime() {
$secs = round($this->execTime);
# convert seconds into HH:MM:SS form
- return sprintf('%02d:%02d:%02d', ($secs / 3600), ($secs / 60 % 60), $secs % 60);
+ return sprintf('%02d:%02d:%02d', (int)($secs / 3600), ( (int)($secs / 60) % 60), $secs % 60);
}
protected function reconnectToDatabase(OutputInterface $output): Connection {