1
0
mirror of https://github.com/arduino/Arduino.git synced 2025-02-19 13:54:23 +01:00

Only check for conflict with an existing C++ file when renaming the sketch, not when adding a new file.

This commit is contained in:
David A. Mellis 2010-05-16 04:09:21 +00:00
parent 3738f450c0
commit 775c4d272c

View File

@ -411,7 +411,7 @@ public class Sketch {
return;
}
if (currentIndex == 0) {
if (renamingCode && currentIndex == 0) {
for (int i = 1; i < codeCount; i++) {
if (sanitaryName.equalsIgnoreCase(code[i].getPrettyName()) &&
code[i].getExtension().equalsIgnoreCase("cpp")) {