Skip to content

Commit

Permalink
[stable22] Check for disk_free_space
Browse files Browse the repository at this point in the history
Backport of #29758
  • Loading branch information
solracsf authored Nov 19, 2021
1 parent a4e6ba1 commit ed252e5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/private/Files/Storage/Local.php
Original file line number Diff line number Diff line change
Expand Up @@ -378,7 +378,7 @@ public function free_space($path) {
// disk_free_space doesn't work on files
$sourcePath = dirname($sourcePath);
}
$space = @disk_free_space($sourcePath);
$space = function_exists('disk_free_space') ? disk_free_space($sourcePath) : false;
if ($space === false || is_null($space)) {
return \OCP\Files\FileInfo::SPACE_UNKNOWN;
}
Expand Down

0 comments on commit ed252e5

Please sign in to comment.