aboutsummaryrefslogtreecommitdiffstats
path: root/apps/files/src
diff options
context:
space:
mode:
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