]> source.dussan.org Git - nextcloud-server.git/commitdiff
[stable22] Check for disk_free_space 29799/head
authoracsfer <carlos@reendex.com>
Fri, 19 Nov 2021 19:05:18 +0000 (20:05 +0100)
committeracsfer (Rebase PR Action) <acsfer@users.noreply.github.com>
Mon, 17 Jan 2022 19:56:35 +0000 (19:56 +0000)
Backport of https://github.com/nextcloud/server/pull/29758

lib/private/Files/Storage/Local.php

index e3436cd52bc0d20a3b44c971cc969c29b48947b5..ba997067ce03795551f90b14e6dca9830becfb66 100644 (file)
@@ -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;
                }