Update apps/files_trashbin/lib/Trashbin.php
Co-Authored-By: Morris Jobke <hey@morrisjobke.de>
This commit is contained in:
parent
fafce34aa0
commit
9bf8ee701f
|
@ -190,7 +190,9 @@ class Trashbin {
|
||||||
$target = $user . '/files_trashbin/files/' . $targetFilename . '.d' . $timestamp;
|
$target = $user . '/files_trashbin/files/' . $targetFilename . '.d' . $timestamp;
|
||||||
$source = $owner . '/files_trashbin/files/' . $sourceFilename . '.d' . $timestamp;
|
$source = $owner . '/files_trashbin/files/' . $sourceFilename . '.d' . $timestamp;
|
||||||
$free = $view->free_space($target);
|
$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);
|
self::copy_recursive($source, $target, $view);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue