From 99579f0bbc81e8ba6b1ce35bb860b0ef01284147 Mon Sep 17 00:00:00 2001 From: skjnldsv Date: Wed, 19 Feb 2025 15:34:45 +0100 Subject: fix(files): do not show extension warning for folders renaming Signed-off-by: skjnldsv --- apps/files/src/store/renaming.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'apps/files/src') 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 -- cgit v1.2.3