Skip to content

Commit 94754d7

Browse files
matthijskooijmanfacchinm
authored andcommitted
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.
1 parent 59b70c8 commit 94754d7

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

app/src/processing/app/Base.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -816,9 +816,8 @@ protected Editor handleOpen(File file, int[] storedLocation, int[] defaultLocati
816816
if (!file.exists()) return null;
817817

818818
// Cycle through open windows to make sure that it's not already open.
819-
String path = file.getAbsolutePath();
820819
for (Editor editor : editors) {
821-
if (editor.getSketch().getMainFilePath().equals(path)) {
820+
if (editor.getSketch().getPrimaryFile().getFile().equals(file)) {
822821
editor.toFront();
823822
return editor;
824823
}

0 commit comments

Comments
 (0)