summaryrefslogtreecommitdiffstats
path: root/lib/private/Files
diff options
context:
space:
mode:
authoracsfer <carlos@reendex.com>2021-11-18 11:46:13 +0100
committerGitHub <noreply@github.com>2021-11-18 11:46:13 +0100
commit152e2bfdaa2cc860b3fb456d6a9bc675c00e6b39 (patch)
tree8e144d4a75be96026d783bef0f515dcc8cd16db0 /lib/private/Files
parent2df7ea7daeb4745c7bfc4a12f34480e47eacf9f9 (diff)
downloadnextcloud-server-152e2bfdaa2cc860b3fb456d6a9bc675c00e6b39.tar.gz
nextcloud-server-152e2bfdaa2cc860b3fb456d6a9bc675c00e6b39.zip
Check for `disk_free_space`
Check for `disk_free_space` before calling it. Fix https://github.com/nextcloud/server/issues/29748
Diffstat (limited to 'lib/private/Files')
-rw-r--r--lib/private/Files/Storage/Local.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/private/Files/Storage/Local.php b/lib/private/Files/Storage/Local.php
index 13f1a6f2ec4..6406beaeebc 100644
--- a/lib/private/Files/Storage/Local.php
+++ b/lib/private/Files/Storage/Local.php
@@ -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;
}