11package processing .app .packages ;
22
3- import processing .app .helpers .FileUtils ;
4- import processing .app .helpers .PreferencesMap ;
3+ import static processing .app .helpers .StringUtils .wildcardMatch ;
54
65import java .io .File ;
76import java .io .IOException ;
109import java .util .Comparator ;
1110import java .util .List ;
1211
13- import static processing .app .helpers .StringUtils .wildcardMatch ;
12+ import processing .app .helpers .FileUtils ;
13+ import processing .app .helpers .PreferencesMap ;
1414
1515public class Library {
1616
@@ -36,7 +36,7 @@ public class Library {
3636 * Scans inside a folder and create a Library object out of it. Automatically
3737 * detects pre-1.5 libraries. Automatically fills metadata from
3838 * library.properties file if found.
39- *
39+ *
4040 * @param libFolder
4141 * @return
4242 */
@@ -69,6 +69,17 @@ private static Library createLibrary(File libFolder) throws IOException {
6969 if (!srcFolder .exists () || !srcFolder .isDirectory ())
7070 throw new IOException ("Missing 'src' folder" );
7171
72+ // 3. Warn if root folder contains development leftovers
73+ for (File file : libFolder .listFiles ()) {
74+ if (file .isDirectory ()) {
75+ if (FileUtils .isSCCSOrHiddenFile (file )) {
76+ System .out .println ("WARNING: Spurious " + file .getName () +
77+ " folder in '" + properties .get ("name" ) + "' library" );
78+ continue ;
79+ }
80+ }
81+ }
82+
7283 // Extract metadata info
7384 List <String > archs = new ArrayList <String >();
7485 for (String arch : properties .get ("architectures" ).split ("," ))
0 commit comments