aboutsummaryrefslogtreecommitdiffstats
path: root/apps/files/src
diff options
context:
space:
mode:
authorskjnldsv <skjnldsv@protonmail.com>2025-02-19 15:34:45 +0100
committerskjnldsv <skjnldsv@protonmail.com>2025-02-19 15:35:50 +0100
commit99579f0bbc81e8ba6b1ce35bb860b0ef01284147 (patch)
tree92c9b3fa9d71d20a43ef9ba7e02b03aee3a5dec9 /apps/files/src
parentff86bacaad7ee9ae5374554df261ab999d5a3496 (diff)
downloadnextcloud-server-fix/files-rename-folder.tar.gz
nextcloud-server-fix/files-rename-folder.zip
fix(files): do not show extension warning for folders renamingfix/files-rename-folder
Signed-off-by: skjnldsv <skjnldsv@protonmail.com>
Diffstat (limited to 'apps/files/src')
-rw-r--r--apps/files/src/store/renaming.ts6
1 files changed, 3 insertions, 3 deletions
diff --git a/apps/files/src/store/renaming.ts b/apps/files/src/store/renaming.ts
index 2ec73837f82..8ed455a182a 100644
--- a/apps/files/src/store/renaming.ts
+++ b/apps/files/src/store/renaming.ts
@@ -7,7 +7,7 @@ import type { RenamingStore } from '../types'
import axios, { isAxiosError } from '@nextcloud/axios'
import { emit, subscribe } from '@nextcloud/event-bus'
-import { NodeStatus } from '@nextcloud/files'
+import { FileType, NodeStatus } from '@nextcloud/files'
import { DialogBuilder } from '@nextcloud/dialogs'
import { t } from '@nextcloud/l10n'
import { basename, dirname, extname } from 'path'
@@ -103,10 +103,10 @@ export const useRenamingStore = function(...args) {
const oldName = this.renamingNode.basename
const oldEncodedSource = this.renamingNode.encodedSource
- // Check for extension change
+ // Check for extension change for files
const oldExtension = extname(oldName)
const newExtension = extname(newName)
- if (oldExtension !== newExtension) {
+ if (oldExtension !== newExtension && this.renamingNode.type === FileType.File) {
const proceed = await showWarningDialog(oldExtension, newExtension)
if (!proceed) {
return false