diff options
author | John Molakvoæ <skjnldsv@users.noreply.github.com> | 2024-09-16 11:32:29 +0200 |
---|---|---|
committer | backportbot[bot] <backportbot[bot]@users.noreply.github.com> | 2024-09-16 15:18:02 +0000 |
commit | 790ef0ea17a7196e15c495886b03d73e0ff88041 (patch) | |
tree | 5949ea097c64f782928ee83e2853298b4be7346e /lib | |
parent | 41111e5f0aba99ad0f151e7ff4994fd6f168b24b (diff) | |
download | nextcloud-server-backport/46218/stable29.tar.gz nextcloud-server-backport/46218/stable29.zip |
chore: improve hash_file php usage in Local Storagebackport/46218/stable29
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 d3655d33543..201f6d7daf4 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) { |