Skip to content

Commit a933bb2

Browse files
committed
handle files that do not exist
1 parent 57ee4c6 commit a933bb2

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

app/src/processing/app/Base.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1370,7 +1370,12 @@ public Editor handleScheme(String schemeUri) {
13701370
if (location.length() > 0) {
13711371
// if it leads with a slash, then it's a file url
13721372
if (location.charAt(0) == '/') {
1373-
handleOpen(location); // it's a full path to a file
1373+
File file = new File(location);
1374+
if (file.exists()) {
1375+
handleOpen(location); // it's a full path to a file
1376+
} else {
1377+
System.err.println(file + " does not exist.");
1378+
}
13741379
} else {
13751380
// turn it into an https url
13761381
final String url = "https://" + location;

0 commit comments

Comments
 (0)