Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
chore: improve hash_file php usage in Local Storage
Co-authored-by: Ferdinand Thiessen <[email protected]>
Signed-off-by: John Molakvoæ <[email protected]>
  • Loading branch information
skjnldsv and susnux committed Nov 18, 2024
commit 03a777b968b16e7ee25e72ddcc46a8a621de2111
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
Loading