diff options
author | John Molakvoæ <skjnldsv@users.noreply.github.com> | 2024-09-16 11:32:29 +0200 |
---|---|---|
committer | John Molakvoæ <skjnldsv@users.noreply.github.com> | 2024-09-16 15:07:21 +0200 |
commit | 9acaf0788f9fb0a1f60d7c6566a46f73a83c87e1 (patch) | |
tree | 3b981f60cf2bed7ef4d723a5096faf9f8decb3b2 /lib | |
parent | 6674f790a9eb81570b887719d1e29b2c1bcbe7a6 (diff) | |
download | nextcloud-server-9acaf0788f9fb0a1f60d7c6566a46f73a83c87e1.tar.gz nextcloud-server-9acaf0788f9fb0a1f60d7c6566a46f73a83c87e1.zip |
chore: improve hash_file php usage in Local Storageartonge/fix/hash_return_type
Co-authored-by: Ferdinand Thiessen <opensource@fthiessen.de>
Signed-off-by: John Molakvoæ <skjnldsv@users.noreply.github.com>
Diffstat (limited to 'lib')
-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 ec4fd84ebe2..c550cf75bc6 100644 --- a/lib/private/Files/Storage/Local.php +++ b/lib/private/Files/Storage/Local.php @@ -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) { |