Print a warning instead than just ignoring #1619

This commit is contained in:
Federico Fissore 2013-10-14 11:55:03 +02:00
parent c0a0e49db6
commit 65708b68a9
1 changed files with 5 additions and 1 deletions

View File

@ -77,7 +77,11 @@ public class Library {
// 3. check if root folder contains prohibited stuff
for (File file : libFolder.listFiles()) {
if (file.isDirectory()) {
if (!SOURCE_CONTROL_FOLDERS.contains(file.getName()) && !OPTIONAL_FOLDERS.contains(file.getName()))
if (SOURCE_CONTROL_FOLDERS.contains(file.getName())) {
System.out.println("WARNING: Ignoring spurious " + file.getName() + " folder in '" + properties.get("name") + "' library");
continue;
}
if (!OPTIONAL_FOLDERS.contains(file.getName()))
throw new IOException("Invalid folder '" + file.getName() + "'.");
} else {
if (!OPTIONAL_FILES.contains(file.getName()))