aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohn Molakvoæ <skjnldsv@users.noreply.github.com>2024-09-16 11:32:29 +0200
committerFerdinand Thiessen <opensource@fthiessen.de>2024-11-18 11:41:26 +0100
commit03a777b968b16e7ee25e72ddcc46a8a621de2111 (patch)
treef91b24ded4d5e214fdc9a2c73c89261e4d9d06d6
parent2608766ed9e844ea563c6a64dced3bdaf5fba395 (diff)
downloadnextcloud-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.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 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) {