FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

skip Android's SDK folder when adding sketches · processing/processing@5b65326 · GitHub

Repository navigation

Commit 5b65326

Browse files
committed
skip Android's SDK folder when adding sketches
1 parent 5391a00 commit 5b65326

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

‎app/src/processing/app/Base.java‎

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1699,6 +1699,15 @@ protected boolean addSketches(JMenu menu, File folder,
16991699
return false; // let's not go there
17001700
}
17011701

1702+
if (folder.getName().equals("sdk")) {
1703+
// This could be Android's SDK folder. Let's double check:
1704+
File suspectSDKPath = new File(folder.getParent(), folder.getName());
1705+
File expectedSDKPath = new File(sketchbookFolder, "android" + File.separator + "sdk");
1706+
if (expectedSDKPath.getAbsolutePath().equals(suspectSDKPath.getAbsolutePath())) {
1707+
return false; // Most likely the SDK folder, skip it
1708+
}
1709+
}
1710+
17021711
String[] list = folder.list();
17031712
// If a bad folder or unreadable or whatever, this will come back null
17041713
if (list == null) {

0 commit comments

Comments
 (0)

Back | FazBrowse Home | New Git URL