Author: toad
Date: 2007-07-26 20:18:36 +0000 (Thu, 26 Jul 2007)
New Revision: 14366

Modified:
   trunk/freenet/src/freenet/node/ConfigurablePersister.java
Log:
Windows does strange things... maybe a permissions problem. Anyway, if the 
creation fails AND the file doesn't exist, there is a problem.

Modified: trunk/freenet/src/freenet/node/ConfigurablePersister.java
===================================================================
--- trunk/freenet/src/freenet/node/ConfigurablePersister.java   2007-07-26 
20:07:02 UTC (rev 14365)
+++ trunk/freenet/src/freenet/node/ConfigurablePersister.java   2007-07-26 
20:18:36 UTC (rev 14366)
@@ -43,7 +43,10 @@
                                break;
                        } else {
                                try {
-                                       f.createNewFile();
+                                       if(!f.createNewFile()) {
+                                               if(f.exists()) continue;
+                                               throw new 
InvalidConfigValueException(l10n("doesNotExistCannotCreate"));
+                                       }
                                } catch (IOException e) {
                                        throw new 
InvalidConfigValueException(l10n("doesNotExistCannotCreate"));
                                }


Reply via email to