diff options
author | Joas Schilling <nickvergessen@gmx.de> | 2016-06-06 13:48:38 +0200 |
---|---|---|
committer | Thomas Müller <DeepDiver1975@users.noreply.github.com> | 2016-06-06 13:48:38 +0200 |
commit | afb4c1e694b45810780b5ac17b7f35940c604e0c (patch) | |
tree | d5720d32e2b4c0a3e20ecb52bb11134f8a3bd926 | |
parent | 6e7eb87c809b26614f075b7a9f5e1304e677b9b4 (diff) | |
download | nextcloud-server-afb4c1e694b45810780b5ac17b7f35940c604e0c.tar.gz nextcloud-server-afb4c1e694b45810780b5ac17b7f35940c604e0c.zip |
Allow public upload when the quota is unlimited (#24988)
-rw-r--r-- | apps/files_sharing/lib/controllers/sharecontroller.php | 2 | ||||
-rw-r--r-- | lib/private/helper.php | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/apps/files_sharing/lib/controllers/sharecontroller.php b/apps/files_sharing/lib/controllers/sharecontroller.php index 838332b8c83..982ce1154a3 100644 --- a/apps/files_sharing/lib/controllers/sharecontroller.php +++ b/apps/files_sharing/lib/controllers/sharecontroller.php @@ -314,7 +314,7 @@ class ShareController extends Controller { * The OC_Util methods require a view. This just uses the node API */ $freeSpace = $share->getNode()->getStorage()->free_space($share->getNode()->getInternalPath()); - if ($freeSpace !== \OCP\Files\FileInfo::SPACE_UNKNOWN) { + if ($freeSpace < \OCP\Files\FileInfo::SPACE_UNLIMITED) { $freeSpace = max($freeSpace, 0); } else { $freeSpace = (INF > 0) ? INF: PHP_INT_MAX; // work around https://bugs.php.net/bug.php?id=69188 diff --git a/lib/private/helper.php b/lib/private/helper.php index 70c50bb7b4b..7a173520249 100644 --- a/lib/private/helper.php +++ b/lib/private/helper.php @@ -500,7 +500,7 @@ class OC_Helper { */ public static function freeSpace($dir) { $freeSpace = \OC\Files\Filesystem::free_space($dir); - if ($freeSpace !== \OCP\Files\FileInfo::SPACE_UNKNOWN) { + if ($freeSpace < \OCP\Files\FileInfo::SPACE_UNLIMITED) { $freeSpace = max($freeSpace, 0); return $freeSpace; } else { |