File tree Expand file tree Collapse file tree 1 file changed +2
-1
lines changed
Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Original file line number Diff line number Diff line change @@ -493,9 +493,10 @@ protected void nameCode(String newName) {
493493 // A regression introduced by Florian's bug report (below) years earlier.
494494 if (!(renamingCode && sanitaryName .equals (current .getPrettyName ()))) {
495495 // 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)
496497 // http://processing.org/bugs/bugzilla/543.html
497498 for (SketchCode c : code ) {
498- if (sanitaryName .equalsIgnoreCase (c .getPrettyName ())) {
499+ if (c != current && sanitaryName .equalsIgnoreCase (c .getPrettyName ())) {
499500 Base .showMessage ("Nope" ,
500501 "A file named \" " + c .getFileName () + "\" already exists at\n " +
501502 "\" " + folder .getAbsolutePath () + "\" " );
You can’t perform that action at this time.
0 commit comments