@@ -1067,8 +1067,6 @@ public Map<String, File> scanLibraries(File folder) {
1067
1067
}
1068
1068
1069
1069
/**
1070
- * <b>XXX FAT lib detection temporary disabled: compatibility issues arised.</b><br/>
1071
- * <br />
1072
1070
* Scans inside a "FAT" (multi-platform) library folder to see if it contains
1073
1071
* a version suitable for the actual selected architecture. If a suitable
1074
1072
* version is found the folder containing that version is returned, otherwise
@@ -1081,27 +1079,12 @@ public Map<String, File> scanLibraries(File folder) {
1081
1079
* @return
1082
1080
*/
1083
1081
public File scanFatLibrary (File libFolder ) {
1084
- // A library is considered "fat" if there are folders besides
1085
- // examples and utility
1086
- boolean fat = false ;
1087
- String [] folders = libFolder .list (new OnlyDirs ());
1088
- for (String folder : folders ) {
1089
- if (folder .equalsIgnoreCase ("examples" ))
1090
- continue ;
1091
- if (folder .equalsIgnoreCase ("utility" ))
1092
- continue ;
1093
- fat = true ;
1094
- break ;
1095
- }
1096
-
1097
- // XXX: Temporary override "FAT" (multiplatform) library detection.
1098
- // Compatibility issues arised: many library uses additional folders
1099
- // https://code.google.com/p/arduino/issues/detail?id=1079
1100
- fat = false ;
1101
-
1102
- if (!fat )
1082
+ // A library is considered "fat" if it contains a file called
1083
+ // "library.properties"
1084
+ File libraryPropFile = new File (libFolder , "library.properties" );
1085
+ if (!libraryPropFile .exists () || !libraryPropFile .isFile ())
1103
1086
return libFolder ;
1104
-
1087
+
1105
1088
// Search for a subfolder for actual architecture, return null if not found
1106
1089
File archSubfolder = new File (libFolder , Base .getTargetPlatform ().getName ());
1107
1090
if (!archSubfolder .exists () || !archSubfolder .isDirectory ())
0 commit comments