summaryrefslogtreecommitdiffstats
path: root/apps/files_trashbin/lib
diff options
context:
space:
mode:
authorRobin Appelman <robin@icewind.nl>2019-09-04 13:06:07 +0200
committerGitHub <noreply@github.com>2019-09-04 13:06:07 +0200
commit9bf8ee701f535d51ecf92cee291935140b3bdc37 (patch)
tree2fa9a4f543dc0047a00468dd9129f6d4d38b876b /apps/files_trashbin/lib
parentfafce34aa035c420a8a30c9dc0f6a7c7c7324166 (diff)
downloadnextcloud-server-9bf8ee701f535d51ecf92cee291935140b3bdc37.tar.gz
nextcloud-server-9bf8ee701f535d51ecf92cee291935140b3bdc37.zip
Update apps/files_trashbin/lib/Trashbin.php
Co-Authored-By: Morris Jobke <hey@morrisjobke.de>
Diffstat (limited to 'apps/files_trashbin/lib')
-rw-r--r--apps/files_trashbin/lib/Trashbin.php4
1 files changed, 3 insertions, 1 deletions
diff --git a/apps/files_trashbin/lib/Trashbin.php b/apps/files_trashbin/lib/Trashbin.php
index d37c99cdef9..a06a5145d99 100644
--- a/apps/files_trashbin/lib/Trashbin.php
+++ b/apps/files_trashbin/lib/Trashbin.php
@@ -190,7 +190,9 @@ class Trashbin {
$target = $user . '/files_trashbin/files/' . $targetFilename . '.d' . $timestamp;
$source = $owner . '/files_trashbin/files/' . $sourceFilename . '.d' . $timestamp;
$free = $view->free_space($target);
- if (($free < 0) || ($view->filesize($source) < $free)) {
+ $isUnknownOrUnlimitedFreeSpace = $free < 0;
+ $isEnoughFreeSpaceLeft = $view->filesize($source) < $free;
+ if ($isUnknownOrUnlimitedFreeSpace || $isEnoughFreeSpaceLeft) {
self::copy_recursive($source, $target, $view);
}