diff options
author | acsfer <carlos@reendex.com> | 2021-11-18 11:46:13 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-11-18 11:46:13 +0100 |
commit | 152e2bfdaa2cc860b3fb456d6a9bc675c00e6b39 (patch) | |
tree | 8e144d4a75be96026d783bef0f515dcc8cd16db0 /lib/private/Files | |
parent | 2df7ea7daeb4745c7bfc4a12f34480e47eacf9f9 (diff) | |
download | nextcloud-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.php | 2 |
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; } |