Author: toad
Date: 2008-02-08 22:49:26 +0000 (Fri, 08 Feb 2008)
New Revision: 17724
Modified:
trunk/freenet/src/freenet/node/fcp/FCPServer.java
Log:
Don't delete the old downloads.dat.gz until we've written the new one.
Delete the test file in checkFile() if we have to make one.
Modified: trunk/freenet/src/freenet/node/fcp/FCPServer.java
===================================================================
--- trunk/freenet/src/freenet/node/fcp/FCPServer.java 2008-02-08 20:53:19 UTC
(rev 17723)
+++ trunk/freenet/src/freenet/node/fcp/FCPServer.java 2008-02-08 22:49:26 UTC
(rev 17724)
@@ -474,6 +474,7 @@
} catch (IOException e) {
throw new
InvalidConfigValueException(l10n("downloadsFileDoesNotExistCannotCreate")+ " :
"+e.getLocalizedMessage());
}
+ f.delete();
}
}
@@ -617,9 +618,7 @@
File compressedTemp = new
File(persistentDownloadsTempFile+".gz");
File compressedFinal = new
File(persistentDownloadsFile.toString()+".gz");
- // delete files created by check()
- persistentDownloadsFile.delete();
- persistentDownloadsTempFile.delete();
+ compressedTemp.delete();
FileOutputStream fos = null;
BufferedOutputStream bos = null;