aboutsummaryrefslogtreecommitdiffstats
path: root/apps/encryption/lib
diff options
context:
space:
mode:
authorVincent Petry <vincent@nextcloud.com>2021-06-24 10:51:07 +0200
committerVincent Petry <vincent@nextcloud.com>2021-06-29 14:39:51 +0200
commit101c65a94981b1ac6b01166c5e5e3c0bbf6128a7 (patch)
tree2f7fb89929cbd6da3bd85eae8ffa1caa062e6226 /apps/encryption/lib
parent6170912acec2d60467dd07e5d0871e68796e1408 (diff)
downloadnextcloud-server-101c65a94981b1ac6b01166c5e5e3c0bbf6128a7.tar.gz
nextcloud-server-101c65a94981b1ac6b01166c5e5e3c0bbf6128a7.zip
Fix FixEncryptedVersionTest test
Fixed setup to use EncryptionTrait like other existing tests. Fix expectations to not rely on side effects from previous test cases. Signed-off-by: Vincent Petry <vincent@nextcloud.com>
Diffstat (limited to 'apps/encryption/lib')
-rw-r--r--apps/encryption/lib/Command/FixEncryptedVersion.php10
1 files changed, 5 insertions, 5 deletions
diff --git a/apps/encryption/lib/Command/FixEncryptedVersion.php b/apps/encryption/lib/Command/FixEncryptedVersion.php
index 88a72f43324..e2181f9a229 100644
--- a/apps/encryption/lib/Command/FixEncryptedVersion.php
+++ b/apps/encryption/lib/Command/FixEncryptedVersion.php
@@ -121,12 +121,12 @@ class FixEncryptedVersion extends Command {
private function walkPathOfUser($user, $path, OutputInterface $output): int {
$this->setupUserFs($user);
if (!$this->view->file_exists($path)) {
- $output->writeln("<error>Path $path does not exist. Please provide a valid path.</error>");
+ $output->writeln("<error>Path \"$path\" does not exist. Please provide a valid path.</error>");
return 1;
}
if ($this->view->is_file($path)) {
- $output->writeln("Verifying the content of file $path");
+ $output->writeln("Verifying the content of file \"$path\"");
$this->verifyFileContent($path, $output);
return 0;
}
@@ -139,7 +139,7 @@ class FixEncryptedVersion extends Command {
if ($this->view->is_dir($path)) {
$directories[] = $path;
} else {
- $output->writeln("Verifying the content of file $path");
+ $output->writeln("Verifying the content of file \"$path\"");
$this->verifyFileContent($path, $output);
}
}
@@ -164,7 +164,7 @@ class FixEncryptedVersion extends Command {
$handle = $this->view->fopen($path, 'rb');
if (\fread($handle, 9001) !== false) {
- $output->writeln("<info>The file $path is: OK</info>");
+ $output->writeln("<info>The file \"$path\" is: OK</info>");
}
\fclose($handle);
@@ -175,7 +175,7 @@ class FixEncryptedVersion extends Command {
//If allowOnce is set to false, this becomes recursive.
if ($ignoreCorrectEncVersionCall === true) {
//Lets rectify the file by correcting encrypted version
- $output->writeln("<info>Attempting to fix the path: $path</info>");
+ $output->writeln("<info>Attempting to fix the path: \"$path\"</info>");
return $this->correctEncryptedVersion($path, $output);
}
return false;