aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohn Molakvoæ <skjnldsv@users.noreply.github.com>2024-09-16 11:32:29 +0200
committerbackportbot[bot] <backportbot[bot]@users.noreply.github.com>2024-09-16 17:08:10 +0000
commit2308294a68f0e1ed6e44a90f1ce40de74b15d007 (patch)
tree0414c291c6d43c2d4ee4614069bbb4bb1b5075e4
parent7c998509585a3300c78aa4f490ae7711f820c33e (diff)
downloadnextcloud-server-backport/46218/stable30.tar.gz
nextcloud-server-backport/46218/stable30.zip
chore: improve hash_file php usage in Local Storagebackport/46218/stable30
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.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 fa239f13ec5..7ca1a2d6f37 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) {