aboutsummaryrefslogtreecommitdiffstats
path: root/apps/files_trashbin/src/files_actions/restoreAction.ts
diff options
context:
space:
mode:
Diffstat (limited to 'apps/files_trashbin/src/files_actions/restoreAction.ts')
-rw-r--r--apps/files_trashbin/src/files_actions/restoreAction.ts4
1 files changed, 4 insertions, 0 deletions
diff --git a/apps/files_trashbin/src/files_actions/restoreAction.ts b/apps/files_trashbin/src/files_actions/restoreAction.ts
index 9af0a13a2b0..3aeeceea7b3 100644
--- a/apps/files_trashbin/src/files_actions/restoreAction.ts
+++ b/apps/files_trashbin/src/files_actions/restoreAction.ts
@@ -3,6 +3,7 @@
* SPDX-License-Identifier: AGPL-3.0-or-later
*/
import { getCurrentUser } from '@nextcloud/auth'
+import { showError } from '@nextcloud/dialogs'
import { emit } from '@nextcloud/event-bus'
import { Permission, Node, View, FileAction } from '@nextcloud/files'
import { t } from '@nextcloud/l10n'
@@ -52,6 +53,9 @@ export const restoreAction = new FileAction({
emit('files:node:deleted', node)
return true
} catch (error) {
+ if (error.response?.status === 507) {
+ showError(t('files_trashbin', 'Not enough free space to restore the file/folder'))
+ }
logger.error('Failed to restore node', { error, node })
return false
}