mirror of https://github.com/noisymime/Arduino.git
In `Base.handleOpen()`, compare Files rather than Strings
Comparing a File object automatically takes care of filesystem case sensitivity, whereas strings do not, so this makes the comparison slightly more reliable.
This commit is contained in:
parent
59b70c8373
commit
94754d7841
|
@ -816,9 +816,8 @@ public class Base {
|
||||||
if (!file.exists()) return null;
|
if (!file.exists()) return null;
|
||||||
|
|
||||||
// Cycle through open windows to make sure that it's not already open.
|
// Cycle through open windows to make sure that it's not already open.
|
||||||
String path = file.getAbsolutePath();
|
|
||||||
for (Editor editor : editors) {
|
for (Editor editor : editors) {
|
||||||
if (editor.getSketch().getMainFilePath().equals(path)) {
|
if (editor.getSketch().getPrimaryFile().getFile().equals(file)) {
|
||||||
editor.toFront();
|
editor.toFront();
|
||||||
return editor;
|
return editor;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue