Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoracsfer <carlos@reendex.com>2021-11-18 13:46:13 +0300
committerGitHub <noreply@github.com>2021-11-18 13:46:13 +0300
commit152e2bfdaa2cc860b3fb456d6a9bc675c00e6b39 (patch)
tree8e144d4a75be96026d783bef0f515dcc8cd16db0 /lib/private/Files/Storage
parent2df7ea7daeb4745c7bfc4a12f34480e47eacf9f9 (diff)
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/Storage')
-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;
}