skip Android's SDK folder when adding sketches

This commit is contained in:
codeanticode
2019-01-03 23:47:57 +09:00
parent ad2e2baf2e
commit 74d6becd05

View File

@@ -1699,6 +1699,15 @@ public class Base {
return false; // let's not go there
}
if (folder.getName().equals("sdk")) {
// This could be Android's SDK folder. Let's double check:
File suspectSDKPath = new File(folder.getParent(), folder.getName());
File expectedSDKPath = new File(sketchbookFolder, "android" + File.separator + "sdk");
if (expectedSDKPath.getAbsolutePath().equals(suspectSDKPath.getAbsolutePath())) {
return false; // Most likely the SDK folder, skip it
}
}
String[] list = folder.list();
// If a bad folder or unreadable or whatever, this will come back null
if (list == null) {