mirror of
https://github.com/processing/processing4.git
synced 2026-02-12 18:10:43 +01:00
Merge pull request #2825 from federicobond/rename-fix
Fix renaming from RGB to Rgb.java and others
This commit is contained in:
@@ -493,9 +493,10 @@ public class Sketch {
|
||||
// A regression introduced by Florian's bug report (below) years earlier.
|
||||
if (!(renamingCode && sanitaryName.equals(current.getPrettyName()))) {
|
||||
// Make sure no .pde *and* no .java files with the same name already exist
|
||||
// (other than the one we are currently attempting to rename)
|
||||
// http://processing.org/bugs/bugzilla/543.html
|
||||
for (SketchCode c : code) {
|
||||
if (sanitaryName.equalsIgnoreCase(c.getPrettyName())) {
|
||||
if (c != current && sanitaryName.equalsIgnoreCase(c.getPrettyName())) {
|
||||
Base.showMessage("Nope",
|
||||
"A file named \"" + c.getFileName() + "\" already exists at\n" +
|
||||
"\"" + folder.getAbsolutePath() + "\"");
|
||||
|
||||
Reference in New Issue
Block a user