mirror of
https://github.com/arduino/Arduino.git
synced 2024-12-01 12:24:14 +01:00
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;
|
||||
|
||||
// Cycle through open windows to make sure that it's not already open.
|
||||
String path = file.getAbsolutePath();
|
||||
for (Editor editor : editors) {
|
||||
if (editor.getSketch().getMainFilePath().equals(path)) {
|
||||
if (editor.getSketch().getPrimaryFile().getFile().equals(file)) {
|
||||
editor.toFront();
|
||||
return editor;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user