diff options
author | provokateurin <kate@provokateurin.de> | 2025-01-08 07:46:32 +0100 |
---|---|---|
committer | provokateurin <kate@provokateurin.de> | 2025-01-13 15:19:19 +0100 |
commit | badf6ab9359f548c6288877da1f84cde51f3d99c (patch) | |
tree | e4b74578d512ebb16325fadb08ebaee128ed654e /apps/files_trashbin/src | |
parent | 31c21c779723fb6efbe6aa89b2093091c5d3e187 (diff) | |
download | nextcloud-server-badf6ab9359f548c6288877da1f84cde51f3d99c.tar.gz nextcloud-server-badf6ab9359f548c6288877da1f84cde51f3d99c.zip |
fix(files_trashbin): Only emit files:node:deleted events if deleting all trash was successful
Signed-off-by: provokateurin <kate@provokateurin.de>
Diffstat (limited to 'apps/files_trashbin/src')
-rw-r--r-- | apps/files_trashbin/src/fileListActions/emptyTrashAction.ts | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/apps/files_trashbin/src/fileListActions/emptyTrashAction.ts b/apps/files_trashbin/src/fileListActions/emptyTrashAction.ts index a77a4ad89f3..f9cc3b301db 100644 --- a/apps/files_trashbin/src/fileListActions/emptyTrashAction.ts +++ b/apps/files_trashbin/src/fileListActions/emptyTrashAction.ts @@ -82,8 +82,9 @@ export const emptyTrashAction = new FileListAction({ const result = await askConfirmation if (result === true) { - await emptyTrash() - nodes.forEach((node) => emit('files:node:deleted', node)) + if (await emptyTrash()) { + nodes.forEach((node) => emit('files:node:deleted', node)) + } return } |