From ddde99940b2080de54ff69d40d91de5127a87e1b Mon Sep 17 00:00:00 2001 From: Keshav Date: Thu, 15 Feb 2024 21:12:25 +0530 Subject: [PATCH] fix:#3014 --- client/modules/IDE/components/FileNode.jsx | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/client/modules/IDE/components/FileNode.jsx b/client/modules/IDE/components/FileNode.jsx index 0b6424a783..e4d1a08a26 100644 --- a/client/modules/IDE/components/FileNode.jsx +++ b/client/modules/IDE/components/FileNode.jsx @@ -187,11 +187,19 @@ class FileNode extends React.Component { if ( hasEmptyFilename || hasNoExtension || - notSameExtension || hasOnlyExtension || hasExtensionIfFolder ) { this.setUpdatedName(currentName); + } else if (notSameExtension) { + const userResponse = window.confirm( + 'Are you sure you want to change the file extension?' + ); + if (userResponse) { + this.saveUpdatedFileName(); + } else { + this.setUpdatedName(currentName); + } } else { this.saveUpdatedFileName(); }