mirror of
https://github.com/nextcloud/server.git
synced 2026-02-20 00:12:30 -05:00
Merge pull request #37062 from nextcloud/free-space
Check free space only if source exists and is dir
This commit is contained in:
commit
4cc5885615
1 changed files with 1 additions and 1 deletions
|
|
@ -418,7 +418,7 @@ class Local extends \OC\Files\Storage\Common {
|
|||
// disk_free_space doesn't work on files
|
||||
$sourcePath = dirname($sourcePath);
|
||||
}
|
||||
$space = function_exists('disk_free_space') ? 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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue