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
2 people authored and backportbot[bot] committed Sep 16, 2024
commit 790ef0ea17a7196e15c495886b03d73e0ff88041
9 changes: 1 addition & 8 deletions lib/private/Files/Storage/Local.php
Original file line number Diff line number Diff line change
Expand Up @@ -436,14 +436,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