Author: nextgens
Date: 2007-11-30 23:44:06 +0000 (Fri, 30 Nov 2007)
New Revision: 16168
Modified:
trunk/freenet/src/freenet/node/fcp/FCPConnectionHandler.java
Log:
Resolve #1856: Nested TestDDA fails
Modified: trunk/freenet/src/freenet/node/fcp/FCPConnectionHandler.java
===================================================================
--- trunk/freenet/src/freenet/node/fcp/FCPConnectionHandler.java
2007-11-30 23:34:04 UTC (rev 16167)
+++ trunk/freenet/src/freenet/node/fcp/FCPConnectionHandler.java
2007-11-30 23:44:06 UTC (rev 16168)
@@ -372,8 +372,15 @@
if(!directory.exists() || !directory.isDirectory())
throw new IllegalArgumentException("The specified path
isn't a directory! or doesn't exist or the node doesn't have access to it!");
+ // See #1856
+ DDACheckJob job = null;
+ synchronized (inTestDirectories) {
+ job = (DDACheckJob) inTestDirectories.get(directory);
+ }
+ if(job != null)
+ throw new IllegalArgumentException("There is already a
TestDDA going on for that directory!");
+
File writeFile = (write ? new File(path, "DDACheck-" + new
Random().nextInt() + ".tmp") : null);
-
File readFile = null;
if(read) {
try {