Merge pull request #29798 from nextcloud/stable23-disk

This commit is contained in:
John Molakvoæ 2022-01-20 10:36:40 +01:00 committed by GitHub
commit 2645b6cd69
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -378,7 +378,7 @@ class Local extends \OC\Files\Storage\Common {
// 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;
}