Merge pull request #22200 from owncloud/node-checksum-resolvefileinfo
Make sure fileinfo exists when calling getCheckSum in node API
This commit is contained in:
commit
ec399e6bbc
2 changed files with 11 additions and 1 deletions
|
@ -169,6 +169,6 @@ class File extends Node implements \OCP\Files\File {
|
|||
* @inheritdoc
|
||||
*/
|
||||
public function getChecksum() {
|
||||
return $this->fileInfo->getChecksum();
|
||||
return $this->getFileInfo()->getChecksum();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -84,4 +84,14 @@ interface File extends Node {
|
|||
* @since 6.0.0
|
||||
*/
|
||||
public function hash($type, $raw = false);
|
||||
|
||||
/**
|
||||
* Get the stored checksum for this file
|
||||
*
|
||||
* @return string
|
||||
* @since 9.0.0
|
||||
* @throws InvalidPathException
|
||||
* @throws NotFoundException
|
||||
*/
|
||||
public function getChecksum();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue