[freenet-cvs] r20128 - trunk/freenet/src/freenet/node/fcp

bombe at freenetproject.org bombe at freenetproject.org
Thu May 29 06:18:35 UTC 2008


Author: bombe
Date: 2008-05-29 06:18:34 +0000 (Thu, 29 May 2008)
New Revision: 20128

Modified:
   trunk/freenet/src/freenet/node/fcp/ClientPut.java
Log:
prevent null pointer exception

Modified: trunk/freenet/src/freenet/node/fcp/ClientPut.java
===================================================================
--- trunk/freenet/src/freenet/node/fcp/ClientPut.java	2008-05-29 04:45:35 UTC (rev 20127)
+++ trunk/freenet/src/freenet/node/fcp/ClientPut.java	2008-05-29 06:18:34 UTC (rev 20128)
@@ -190,7 +190,7 @@
 		if(mimeType == null && origFilename != null) {
 			mimeType = DefaultMIMETypes.guessMIMEType(origFilename.getName(), true);
 		}
-		if (mimeType == null) {
+		if ((mimeType == null) && (targetFilename != null)) {
 			mimeType = DefaultMIMETypes.guessMIMEType(targetFilename, true);
 		}
 		if(mimeType == null) {




More information about the cvs mailing list