chore: improve hash_file php usage in Local Storage

Co-authored-by: Ferdinand Thiessen <opensource@fthiessen.de>
Signed-off-by: John Molakvoæ <skjnldsv@users.noreply.github.com>
This commit is contained in:
John Molakvoæ 2024-09-16 11:32:29 +02:00
parent 6674f790a9
commit 9acaf0788f

View file

@ -401,14 +401,7 @@ class Local extends \OC\Files\Storage\Common {
}
public function hash($type, $path, $raw = false): string|false {
/** @var string|false|null */
$hash = hash_file($type, $this->getSourcePath($path), $raw);
if ($hash === null) {
return false;
}
return $hash;
return hash_file($type, $this->getSourcePath($path), $raw);
}
public function free_space($path) {