1
0
mirror of https://github.com/esp8266/Arduino.git synced 2025-08-14 08:03:09 +03:00

Avoid warning about SCCS folders in libraries, just ignore them. Fixes #3237

This commit is contained in:
Federico Fissore
2015-05-27 11:26:00 +02:00
parent a3eae13e5d
commit 4748e9df5e
2 changed files with 19 additions and 11 deletions

View File

@@ -83,8 +83,7 @@ public class UserLibrary extends ContributedLibrary {
// "arch" folder no longer supported
File archFolder = new File(libFolder, "arch");
if (archFolder.isDirectory())
throw new IOException("'arch' folder is no longer supported! See "
+ "http://goo.gl/gfFJzU for more information");
throw new IOException("'arch' folder is no longer supported! See http://goo.gl/gfFJzU for more information");
// Check mandatory properties
for (String p : MANDATORY_PROPERTIES)
@@ -101,8 +100,7 @@ public class UserLibrary extends ContributedLibrary {
File utilFolder = new File(libFolder, "utility");
if (utilFolder.exists() && utilFolder.isDirectory()) {
throw new IOException(
"Library can't use both 'src' and 'utility' folders.");
throw new IOException("Library can't use both 'src' and 'utility' folders.");
}
} else {
// Layout with source code on library's root and "utility" folders
@@ -110,11 +108,14 @@ public class UserLibrary extends ContributedLibrary {
}
// Warn if root folder contains development leftovers
for (File file : libFolder.listFiles()) {
if (file.isDirectory()) {
if (FileUtils.isSCCSOrHiddenFile(file)) {
File[] files = libFolder.listFiles();
if (files == null) {
throw new IOException("Unable to list files of library in " + libFolder);
}
for (File file : files) {
if (file.isDirectory() && FileUtils.isSCCSOrHiddenFile(file)) {
if (!FileUtils.isSCCSFolder(file) && FileUtils.isHiddenFile(file)) {
System.out.println("WARNING: Spurious " + file.getName() + " folder in '" + properties.get("name") + "' library");
continue;
}
}
}
@@ -131,8 +132,7 @@ public class UserLibrary extends ContributedLibrary {
if (category == null)
category = "Uncategorized";
if (!CATEGORIES.contains(category)) {
System.out.println("WARNING: Category '" + category + "' in library " +
properties.get("name") + " is not valid. Setting to 'Uncategorized'");
System.out.println("WARNING: Category '" + category + "' in library " + properties.get("name") + " is not valid. Setting to 'Uncategorized'");
category = "Uncategorized";
}