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:
Matthijs Kooijman 2014-04-08 12:54:17 +02:00 committed by Cristian Maglie
parent f96d71f32d
commit 4f33d0851c
1 changed files with 1 additions and 1 deletions

View File

@ -2120,7 +2120,7 @@ public class Editor extends JFrame implements RunnerListener {
String pdeName = parentName + ".pde";
File altPdeFile = new File(parent, pdeName);
String inoName = parentName + ".ino";
File altInoFile = new File(parent, pdeName);
File altInoFile = new File(parent, inoName);
if (pdeName.equals(fileName) || inoName.equals(fileName)) {
// no beef with this guy