We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 81f41e1 + e14afe4 commit 01b44c5Copy full SHA for 01b44c5
1 file changed
app/src/processing/app/Sketch.java
@@ -493,9 +493,10 @@ protected void nameCode(String newName) {
493
// A regression introduced by Florian's bug report (below) years earlier.
494
if (!(renamingCode && sanitaryName.equals(current.getPrettyName()))) {
495
// Make sure no .pde *and* no .java files with the same name already exist
496
+ // (other than the one we are currently attempting to rename)
497
// http://processing.org/bugs/bugzilla/543.html
498
for (SketchCode c : code) {
- if (sanitaryName.equalsIgnoreCase(c.getPrettyName())) {
499
+ if (c != current && sanitaryName.equalsIgnoreCase(c.getPrettyName())) {
500
Base.showMessage("Nope",
501
"A file named \"" + c.getFileName() + "\" already exists at\n" +
502
"\"" + folder.getAbsolutePath() + "\"");
0 commit comments