r26671 - trunk/freenet/src/freenet/clients/http

[email protected]
Newsgroups gmane.network.freenet.cvs
Message-ID <[email protected]>
Author: toad
Date: 2009-04-09 00:09:28 +0000 (Thu, 09 Apr 2009)
New Revision: 26671

Modified:
   trunk/freenet/src/freenet/clients/http/LocalFileInsertToadlet.java
Log:
Fix NPE, FIXME about more NPEs


Modified: trunk/freenet/src/freenet/clients/http/LocalFileInsertToadlet.java
===================================================================
--- trunk/freenet/src/freenet/clients/http/LocalFileInsertToadlet.java	2009-04-08 23:59:04 UTC (rev 26670)
+++ trunk/freenet/src/freenet/clients/http/LocalFileInsertToadlet.java	2009-04-09 00:09:28 UTC (rev 26671)
@@ -36,6 +36,7 @@
 		this.core = core;
 	}
 
+	// FIXME reentrancy issues with currentPath - fix running two at once.
 	/**
 	 * @see freenet.clients.http.Toadlet#handleGet(java.net.URI,
 	 *      freenet.clients.http.ToadletContext)
@@ -90,6 +91,9 @@
 			}
 		}
 		
+		if(currentPath == null)
+			currentPath = thisPath;
+		
 		HTMLNode pageNode;
 
 		if (currentPath.exists() && currentPath.isDirectory() && currentPath.canRead()) {
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.