aboutsummaryrefslogtreecommitdiffstats
path: root/lib
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 15:16:56 +0000
commit063a726280456ca6a7403768d532dd2285c256db (patch)
treef29f7090f08767cc5c01942ba4653536028753c9 /lib
parent3dc095255189b981487a0f416104838543b7f947 (diff)
downloadnextcloud-server-063a726280456ca6a7403768d532dd2285c256db.tar.gz
nextcloud-server-063a726280456ca6a7403768d532dd2285c256db.zip
chore: improve hash_file php usage in Local Storagebackport/46218/stable28
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 a9d91d16454..afaddd2b339 100644
--- a/lib/private/Files/Storage/Local.php
+++ b/lib/private/Files/Storage/Local.php
@@ -436,14 +436,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) {