aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorJohn Molakvoæ <skjnldsv@users.noreply.github.com>2024-09-16 11:32:29 +0200
committerJohn Molakvoæ <skjnldsv@users.noreply.github.com>2024-09-16 15:07:21 +0200
commit9acaf0788f9fb0a1f60d7c6566a46f73a83c87e1 (patch)
tree3b981f60cf2bed7ef4d723a5096faf9f8decb3b2 /lib
parent6674f790a9eb81570b887719d1e29b2c1bcbe7a6 (diff)
downloadnextcloud-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.php9
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) {