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

skip files that cant be opened for FixEncryptedVersion
This commit is contained in:
Robin Appelman 2022-11-25 17:09:34 +01:00 коммит произвёл GitHub
Родитель e8ae4406ce 06b2ed2641
Коммит 61e72d4b0f
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
1 изменённых файлов: 5 добавлений и 0 удалений

Просмотреть файл

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