Merge pull request #25776 from nextcloud/fix/sabre-file-checksum-no-file-info

Only write checksum if we have a valid file info
This commit is contained in:
Roeland Jago Douma 2021-03-23 08:59:21 +01:00 committed by GitHub
commit a219fa587a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 1 deletions

View File

@ -680,9 +680,12 @@ class File extends Node implements IFile {
/**
* Get the checksum for this file
*
* @return string
* @return string|null
*/
public function getChecksum() {
if (!$this->info) {
return null;
}
return $this->info->getChecksum();
}