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
Add function_exists() check
Co-authored-by: Simon L. <[email protected]>
Signed-off-by: Git'Fellow <[email protected]>
  • Loading branch information
2 people authored and icewind1991 committed May 12, 2023
commit e41eb529b8076917dd530d6d599da2f5e1ad43a0
2 changes: 1 addition & 1 deletion lib/private/Files/Storage/Local.php
Original file line number Diff line number Diff line change
Expand Up @@ -418,7 +418,7 @@ public function free_space($path) {
// disk_free_space doesn't work on files
$sourcePath = dirname($sourcePath);
}
$space = is_dir($sourcePath) ? disk_free_space($sourcePath) : false;
$space = (function_exists('disk_free_space') && is_dir($sourcePath)) ? disk_free_space($sourcePath) : false;
if ($space === false || is_null($space)) {
return \OCP\Files\FileInfo::SPACE_UNKNOWN;
}
Expand Down