mirror of
https://github.com/nextcloud/server.git
synced 2026-04-26 00:27:49 -04:00
[stable22] Check for disk_free_space
Backport of https://github.com/nextcloud/server/pull/29758
This commit is contained in:
parent
bc81ebd496
commit
ad5ea4eb06
1 changed files with 1 additions and 1 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue