From 4caeb411a8f64bd44d3c6077c8f2ca0a6e857f7c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?John=20Molakvo=C3=A6?= Date: Mon, 16 Sep 2024 11:32:29 +0200 Subject: [PATCH] chore: improve hash_file php usage in Local Storage MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Ferdinand Thiessen Signed-off-by: John Molakvoæ --- lib/private/Files/Storage/Local.php | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/lib/private/Files/Storage/Local.php b/lib/private/Files/Storage/Local.php index 3c241dbc4bc3b..9456d70b9d43c 100644 --- a/lib/private/Files/Storage/Local.php +++ b/lib/private/Files/Storage/Local.php @@ -440,14 +440,7 @@ public function fopen($path, $mode) { } 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) {