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 authored Sep 16, 2024
1 parent 3a61867 commit b392f5d
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 @@ -400,14 +400,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 b392f5d

Please sign in to comment.