summaryrefslogtreecommitdiffstats
path: root/apps/files_trashbin/lib
diff options
context:
space:
mode:
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);
}