Merge pull request #63070 from nextcloud/jtr/fix-trashbin-move2file-failureCleanup-db

fix(files_trashbin): cleanup trash metadata after failed cross-user moves
pull/62695/merge
Andy Scherzinger 2 weeks ago committed by GitHub
commit 80ffd83551
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 4
      apps/files_trashbin/lib/Trashbin.php

@ -391,7 +391,9 @@ class Trashbin implements IEventListener {
'timestamp' => $timestamp,
]
);
self::deleteTrashRow($user, $filename, $timestamp);
// The metadata row belongs to the owner, even when another user initiated
// the deletion.
self::deleteTrashRow($owner, $filename, $timestamp);
if ($trashStorage->file_exists($trashInternalPath)) {
if ($trashStorage->is_dir($trashInternalPath)) {
$trashStorage->rmdir($trashInternalPath);

Loading…
Cancel
Save