Skip to content

Commit ddde999

Browse files
committed
fix:#3014
1 parent 6cac275 commit ddde999

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

client/modules/IDE/components/FileNode.jsx

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,11 +187,19 @@ class FileNode extends React.Component {
187187
if (
188188
hasEmptyFilename ||
189189
hasNoExtension ||
190-
notSameExtension ||
191190
hasOnlyExtension ||
192191
hasExtensionIfFolder
193192
) {
194193
this.setUpdatedName(currentName);
194+
} 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+
}
195203
} else {
196204
this.saveUpdatedFileName();
197205
}

0 commit comments

Comments
 (0)