We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 64929c9 + 2681f9a commit 54e743aCopy full SHA for 54e743a
client/modules/IDE/components/FileNode.jsx
@@ -187,11 +187,19 @@ class FileNode extends React.Component {
187
if (
188
hasEmptyFilename ||
189
hasNoExtension ||
190
- notSameExtension ||
191
hasOnlyExtension ||
192
hasExtensionIfFolder
193
) {
194
this.setUpdatedName(currentName);
+ } else if (notSameExtension) {
195
+ const userResponse = window.confirm(
196
+ 'Are you sure you want to change the file extension?'
197
+ );
198
+ if (userResponse) {
199
+ this.saveUpdatedFileName();
200
+ } else {
201
+ this.setUpdatedName(currentName);
202
+ }
203
} else {
204
this.saveUpdatedFileName();
205
}
0 commit comments