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
skjnldsv and susnux committed Sep 16, 2024
1 parent 6674f79 commit 9acaf07
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 @@ -401,14 +401,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 9acaf07

Please sign in to comment.