diff options
author | Robin Appelman <robin@icewind.nl> | 2022-11-25 17:09:34 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-11-25 17:09:34 +0100 |
commit | 61e72d4b0f3723eb9edf3cae0f9dbce5a8953012 (patch) | |
tree | 88e4278eb8131e82439ca0c042814acf77887bfd /apps/encryption | |
parent | e8ae4406ce5778c8e5053a03d75b1d41fdd06870 (diff) | |
parent | 06b2ed26413bb381ea9bcff32196d5727e298954 (diff) | |
download | nextcloud-server-61e72d4b0f3723eb9edf3cae0f9dbce5a8953012.tar.gz nextcloud-server-61e72d4b0f3723eb9edf3cae0f9dbce5a8953012.zip |
Merge pull request #35337 from nextcloud/fix-encrypted-version-fopen-error
skip files that cant be opened for FixEncryptedVersion
Diffstat (limited to 'apps/encryption')
-rw-r--r-- | apps/encryption/lib/Command/FixEncryptedVersion.php | 5 |
1 files changed, 5 insertions, 0 deletions
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("<warning>Failed to open file: \"$path\" skipping</warning>"); + return true; + } + if (\fread($handle, 9001) !== false) { $fileInfo = $this->view->getFileInfo($path); if (!$fileInfo) { |