Skip to content

Commit ad5ea4e

Browse files
solracsfacsfer (Rebase PR Action)
authored andcommitted
[stable22] Check for disk_free_space
Backport of #29758
1 parent bc81ebd commit ad5ea4e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/private/Files/Storage/Local.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -378,7 +378,7 @@ public function free_space($path) {
378378
// disk_free_space doesn't work on files
379379
$sourcePath = dirname($sourcePath);
380380
}
381-
$space = @disk_free_space($sourcePath);
381+
$space = function_exists('disk_free_space') ? disk_free_space($sourcePath) : false;
382382
if ($space === false || is_null($space)) {
383383
return \OCP\Files\FileInfo::SPACE_UNKNOWN;
384384
}

0 commit comments

Comments
 (0)