Latest bnd sync

git-svn-id: https://svn.apache.org/repos/asf/felix/trunk@1370165 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/bundleplugin/src/main/java/aQute/libg/cafs/CAFS.java b/bundleplugin/src/main/java/aQute/libg/cafs/CAFS.java
index b97babc..c89c5f2 100644
--- a/bundleplugin/src/main/java/aQute/libg/cafs/CAFS.java
+++ b/bundleplugin/src/main/java/aQute/libg/cafs/CAFS.java
@@ -62,7 +62,12 @@
 		this.home = home;
 		if (!home.isDirectory()) {
 			if (create) {
-				home.mkdirs();
+				if (home.exists()) {
+					throw new IOException(home + " is not a directory");
+				}
+				if (!home.mkdirs()) {
+					throw new IOException("Could not create directory " + home);
+				}
 			} else
 				throw new IllegalArgumentException("CAFS requires a directory with create=false");
 		}
@@ -290,6 +295,7 @@
 				return size;
 			}
 
+			@Override
 			public int read() throws IOException {
 				int c = super.read();
 				if (c < 0)
@@ -315,6 +321,7 @@
 							+ calculatedSha1));
 			}
 
+			@Override
 			public void close() throws IOException {
 				eof();
 				super.close();