From: Robin Appelman Date: Tue, 22 Nov 2022 15:40:12 +0000 (+0100) Subject: skip files that cant be opened for FixEncryptedVersion X-Git-Tag: v26.0.0beta1~338^2 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=06b2ed26413bb381ea9bcff32196d5727e298954;p=nextcloud-server.git skip files that cant be opened for FixEncryptedVersion Signed-off-by: Robin Appelman --- diff --git a/apps/encryption/lib/Command/FixEncryptedVersion.php b/apps/encryption/lib/Command/FixEncryptedVersion.php index d4c5eddbfe5..ab9cc528c54 100644 --- a/apps/encryption/lib/Command/FixEncryptedVersion.php +++ b/apps/encryption/lib/Command/FixEncryptedVersion.php @@ -174,6 +174,11 @@ class FixEncryptedVersion extends Command { */ $handle = $this->view->fopen($path, 'rb'); + if ($handle === false) { + $output->writeln("Failed to open file: \"$path\" skipping"); + return true; + } + if (\fread($handle, 9001) !== false) { $fileInfo = $this->view->getFileInfo($path); if (!$fileInfo) {