diff options
author | John Molakvoæ <skjnldsv@users.noreply.github.com> | 2024-09-16 11:32:29 +0200 |
---|---|---|
committer | Ferdinand Thiessen <opensource@fthiessen.de> | 2024-11-18 11:41:26 +0100 |
commit | 03a777b968b16e7ee25e72ddcc46a8a621de2111 (patch) | |
tree | f91b24ded4d5e214fdc9a2c73c89261e4d9d06d6 | |
parent | 2608766ed9e844ea563c6a64dced3bdaf5fba395 (diff) | |
download | nextcloud-server-backport/46218/stable27.tar.gz nextcloud-server-backport/46218/stable27.zip |
chore: improve hash_file php usage in Local Storagebackport/46218/stable27
Co-authored-by: Ferdinand Thiessen <opensource@fthiessen.de>
Signed-off-by: John Molakvoæ <skjnldsv@users.noreply.github.com>
-rw-r--r-- | lib/private/Files/Storage/Local.php | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/lib/private/Files/Storage/Local.php b/lib/private/Files/Storage/Local.php index 3c241dbc4bc..9456d70b9d4 100644 --- a/lib/private/Files/Storage/Local.php +++ b/lib/private/Files/Storage/Local.php @@ -440,14 +440,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) { |