diff options
Diffstat (limited to 'apps')
-rw-r--r-- | apps/files_trashbin/lib/Trashbin.php | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/apps/files_trashbin/lib/Trashbin.php b/apps/files_trashbin/lib/Trashbin.php index 276cdf4e2d9..b1e1d0600b0 100644 --- a/apps/files_trashbin/lib/Trashbin.php +++ b/apps/files_trashbin/lib/Trashbin.php @@ -285,6 +285,14 @@ class Trashbin { $trashStorage->unlink($trashInternalPath); } + $config = \OC::$server->getConfig(); + $systemTrashbinSize = (int)$config->getAppValue('files_trashbin', 'trashbin_size', '-1'); + $userTrashbinSize = (int)$config->getUserValue($owner, 'files_trashbin', 'trashbin_size', '-1'); + $configuredTrashbinSize = ($userTrashbinSize < 0) ? $systemTrashbinSize : $userTrashbinSize; + if ($configuredTrashbinSize >= 0 && $sourceStorage->filesize($sourceInternalPath) >= $configuredTrashbinSize) { + return false; + } + $connection = \OC::$server->getDatabaseConnection(); $connection->beginTransaction(); $trashStorage->getUpdater()->renameFromStorage($sourceStorage, $sourceInternalPath, $trashInternalPath); |