Skip to content

Commit

Permalink
Allow public upload when the quota is unlimited (#24988)
Browse files Browse the repository at this point in the history
  • Loading branch information
nickvergessen authored and DeepDiver1975 committed Jun 6, 2016
1 parent 6e7eb87 commit afb4c1e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion apps/files_sharing/lib/controllers/sharecontroller.php
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,7 @@ public function showShare($token, $path = '') {
* 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
Expand Down
2 changes: 1 addition & 1 deletion lib/private/helper.php
Original file line number Diff line number Diff line change
Expand Up @@ -500,7 +500,7 @@ public static function maxUploadFilesize($dir, $freeSpace = null) {
*/
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 {
Expand Down

0 comments on commit afb4c1e

Please sign in to comment.