add fallback for trashbin original location
Signed-off-by: Robin Appelman <robin@icewind.nl>
This commit is contained in:
parent
2767139ca9
commit
9a220214b8
1 changed files with 5 additions and 1 deletions
|
@ -53,9 +53,13 @@ class LegacyTrashBackend implements ITrashBackend {
|
|||
$parentTrashPath = ($parent instanceof ITrashItem) ? $parent->getTrashPath() : '';
|
||||
$isRoot = $parent === null;
|
||||
return array_map(function (FileInfo $file) use ($parent, $parentTrashPath, $isRoot, $user) {
|
||||
$originalLocation = $isRoot ? $file['extraData'] : $parent->getOriginalLocation() . '/' . $file->getName();
|
||||
if (!$originalLocation) {
|
||||
$originalLocation = $file->getName();
|
||||
}
|
||||
return new TrashItem(
|
||||
$this,
|
||||
$isRoot ? $file['extraData'] : $parent->getOriginalLocation() . '/' . $file->getName(),
|
||||
$originalLocation,
|
||||
$file->getMTime(),
|
||||
$parentTrashPath . '/' . $file->getName() . ($isRoot ? '.d' . $file->getMtime() : ''),
|
||||
$file,
|
||||
|
|
Loading…
Reference in a new issue