dont try to copy trash items to user if the user has not enough free space
Signed-off-by: Robin Appelman <robin@icewind.nl>
This commit is contained in:
parent
80b71ddbfa
commit
fafce34aa0
1 changed files with 4 additions and 1 deletions
|
@ -189,7 +189,10 @@ class Trashbin {
|
|||
|
||||
$target = $user . '/files_trashbin/files/' . $targetFilename . '.d' . $timestamp;
|
||||
$source = $owner . '/files_trashbin/files/' . $sourceFilename . '.d' . $timestamp;
|
||||
self::copy_recursive($source, $target, $view);
|
||||
$free = $view->free_space($target);
|
||||
if (($free < 0) || ($view->filesize($source) < $free)) {
|
||||
self::copy_recursive($source, $target, $view);
|
||||
}
|
||||
|
||||
|
||||
if ($view->file_exists($target)) {
|
||||
|
|
Loading…
Reference in a new issue