check parent dir exists before calling mkdirs to prevent invalid exception message FELIX-1442


git-svn-id: https://svn.apache.org/repos/asf/felix/trunk@800254 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/sigil/common/obr/src/org/apache/felix/sigil/obr/AbstractOBRBundleRepository.java b/sigil/common/obr/src/org/apache/felix/sigil/obr/AbstractOBRBundleRepository.java
index 3c30d36..b7ffc45 100644
--- a/sigil/common/obr/src/org/apache/felix/sigil/obr/AbstractOBRBundleRepository.java
+++ b/sigil/common/obr/src/org/apache/felix/sigil/obr/AbstractOBRBundleRepository.java
@@ -82,7 +82,7 @@
                 c.connect();
                 in = c.getInputStream();
                 File file = getObrlCache();
-                if ( !file.getParentFile().mkdirs() )
+                if ( !file.getParentFile().exists() && !file.getParentFile().mkdirs() )
                 {
                     throw new IOException( "Failed to create obr cache dir " + file.getParentFile() );
                 }