Skip to content

Commit

Permalink
chore: improve hash_file php usage in Local Storage
Browse files Browse the repository at this point in the history
Co-authored-by: Ferdinand Thiessen <opensource@fthiessen.de>
Signed-off-by: John Molakvoæ <skjnldsv@users.noreply.github.com>
  • Loading branch information
2 people authored and backportbot[bot] committed Sep 16, 2024
1 parent e58149a commit 4caeb41
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions lib/private/Files/Storage/Local.php
Original file line number Diff line number Diff line change
Expand Up @@ -440,14 +440,7 @@ public function fopen($path, $mode) {
}

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) {
Expand Down

0 comments on commit 4caeb41

Please sign in to comment.