From e045cd26ccda700a324409f7e6e13ab3f6670a0e Mon Sep 17 00:00:00 2001 From: Cristian Maglie Date: Tue, 24 Dec 2013 16:23:21 +0100 Subject: [PATCH] Added a warning for library using the no longer supported "arch" folder --- app/src/processing/app/packages/Library.java | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/app/src/processing/app/packages/Library.java b/app/src/processing/app/packages/Library.java index 9fc96720f..1e95205c6 100644 --- a/app/src/processing/app/packages/Library.java +++ b/app/src/processing/app/packages/Library.java @@ -58,18 +58,24 @@ public class Library { // Library sanity checks // --------------------- - // 1. Check mandatory properties - - // provide compatibility with 1.5 rev.1 libs - // ("email" field changed to "maintainer") + // Compatibility with 1.5 rev.1 libraries: + // "email" field changed to "maintainer" if (!properties.containsKey("maintainer")) properties.put("maintainer", properties.get("email")); + // Compatibility with 1.5 rev.1 libraries: + // "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"); + + // Check mandatory properties for (String p : MANDATORY_PROPERTIES) if (!properties.containsKey(p)) throw new IOException("Missing '" + p + "' from library"); - // 2. Check layout + // Check layout boolean useRecursion; File srcFolder = new File(libFolder, "src"); @@ -88,7 +94,7 @@ public class Library { useRecursion = false; } - // 3. Warn if root folder contains development leftovers + // Warn if root folder contains development leftovers for (File file : libFolder.listFiles()) { if (file.isDirectory()) { if (FileUtils.isSCCSOrHiddenFile(file)) {