[freenet-cvs] r16846 - trunk/freenet/src/freenet/support

toad at freenetproject.org toad at freenetproject.org
Wed Jan 2 16:49:02 UTC 2008


Author: toad
Date: 2008-01-02 16:49:01 +0000 (Wed, 02 Jan 2008)
New Revision: 16846

Modified:
   trunk/freenet/src/freenet/support/FileLoggerHook.java
Log:
Fix java.lang.IllegalArgumentException: Original doesn't exist!

Modified: trunk/freenet/src/freenet/support/FileLoggerHook.java
===================================================================
--- trunk/freenet/src/freenet/support/FileLoggerHook.java	2008-01-02 13:52:07 UTC (rev 16845)
+++ trunk/freenet/src/freenet/support/FileLoggerHook.java	2008-01-02 16:49:01 UTC (rev 16846)
@@ -298,8 +298,8 @@
 									System.err.println(
 											"Closing alt on change caught " + e);
 								}
-								if(previousFile != null) {
-                                                                        FileUtil.renameTo(latestFile, previousFile);
+								if(previousFile != null && previousFile.exists()) {
+									FileUtil.renameTo(latestFile, previousFile);
 									latestFile.delete();
 								} else {
 									latestFile.delete();




More information about the cvs mailing list