Merge pull request #35337 from nextcloud/fix-encrypted-version-fopen-error

skip files that cant be opened for FixEncryptedVersion
pull/35376/head
Robin Appelman 2022-11-25 17:09:34 +07:00 committed by GitHub
commit 61e72d4b0f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 0 deletions

@ -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) {