felix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Herko ter Horst <he...@terhorst.net>
Subject Typo in DefaultBundleArchive
Date Sun, 26 Feb 2006 16:18:09 GMT
Hi,

I'm developing against the Felix SVN trunk, and after the latest update 
I ran into an issue where my app wouldn't start after running it for the 
first time. The cause seems to be a typo in DefaultBundleArchive that 
causes it to throw an Exception when the data storage directory already 
exists (instead of when it doesn't exist and can't be created either):

Index: 
src/main/java/org/apache/felix/framework/cache/DefaultBundleArchive.java
===================================================================
--- 
src/main/java/org/apache/felix/framework/cache/DefaultBundleArchive.java	(revision 
381114)
+++ 
src/main/java/org/apache/felix/framework/cache/DefaultBundleArchive.java	(working 
copy)
@@ -435,7 +435,7 @@
          // Get bundle data directory.
          File dataDir = new File(m_archiveRootDir, DATA_DIRECTORY);
          // Create the data directory if necessary.
-        if (DefaultBundleCache.getSecureAction().fileExists(dataDir))
+        if (!DefaultBundleCache.getSecureAction().fileExists(dataDir))
          {
              if (!DefaultBundleCache.getSecureAction().mkdir(dataDir))
              {

Cheers,

Herko ter Horst

Mime
View raw message