mirror of
https://github.com/arduino/Arduino.git
synced 2025-03-15 12:29:26 +01:00
Fix opening a non-primary .ino file
When a sketch looks like this: Blink/ Blink.ino Foo.ino The idea is that opening Foo.ino should open up the sketch. However, before this would show an error stating "The file Foo.ino needs to be inside a sketch folder named Foo" instead. This turned out to be due to a typo, which seems to have been present for a long time. Note that when the main sketch file was a .pde file, everything already worked as expected.
This commit is contained in:
parent
f96d71f32d
commit
4f33d0851c
@ -2120,7 +2120,7 @@ public class Editor extends JFrame implements RunnerListener {
|
|||||||
String pdeName = parentName + ".pde";
|
String pdeName = parentName + ".pde";
|
||||||
File altPdeFile = new File(parent, pdeName);
|
File altPdeFile = new File(parent, pdeName);
|
||||||
String inoName = parentName + ".ino";
|
String inoName = parentName + ".ino";
|
||||||
File altInoFile = new File(parent, pdeName);
|
File altInoFile = new File(parent, inoName);
|
||||||
|
|
||||||
if (pdeName.equals(fileName) || inoName.equals(fileName)) {
|
if (pdeName.equals(fileName) || inoName.equals(fileName)) {
|
||||||
// no beef with this guy
|
// no beef with this guy
|
||||||
|
Loading…
x
Reference in New Issue
Block a user