Author: toad
Date: 2005-12-07 16:52:30 +0000 (Wed, 07 Dec 2005)
New Revision: 7684

Modified:
   trunk/freenet/src/freenet/node/TextModeClientInterface.java
   trunk/freenet/src/freenet/node/Version.java
   trunk/freenet/src/freenet/support/FileLoggerHook.java
Log:
283: (mandatory)
Minor bugfixes.

Modified: trunk/freenet/src/freenet/node/TextModeClientInterface.java
===================================================================
--- trunk/freenet/src/freenet/node/TextModeClientInterface.java 2005-12-07 
02:57:13 UTC (rev 7683)
+++ trunk/freenet/src/freenet/node/TextModeClientInterface.java 2005-12-07 
16:52:30 UTC (rev 7684)
@@ -245,7 +245,11 @@
             System.out.println("URI: "+uri);
         } else if(uline.startsWith("PUTFILE:") || (getCHKOnly = 
uline.startsWith("GETCHKFILE:"))) {
             // Just insert to local store
-            line = line.substring("PUTFILE:".length());
+               if(getCHKOnly) {
+                       line = line.substring(("GETCHKFILE:").length());
+               } else {
+                       line = line.substring("PUTFILE:".length());
+               }
             while(line.length() > 0 && line.charAt(0) == ' ')
                 line = line.substring(1);
             while(line.length() > 0 && line.charAt(line.length()-1) == ' ')

Modified: trunk/freenet/src/freenet/node/Version.java
===================================================================
--- trunk/freenet/src/freenet/node/Version.java 2005-12-07 02:57:13 UTC (rev 
7683)
+++ trunk/freenet/src/freenet/node/Version.java 2005-12-07 16:52:30 UTC (rev 
7684)
@@ -20,7 +20,7 @@
        public static final String protocolVersion = "1.0";

        /** The build number of the current revision */
-       public static final int buildNumber = 282;
+       public static final int buildNumber = 283;

        /** Oldest build of Fred we will talk to */
        public static final int lastGoodBuild = 282;

Modified: trunk/freenet/src/freenet/support/FileLoggerHook.java
===================================================================
--- trunk/freenet/src/freenet/support/FileLoggerHook.java       2005-12-07 
02:57:13 UTC (rev 7683)
+++ trunk/freenet/src/freenet/support/FileLoggerHook.java       2005-12-07 
16:52:30 UTC (rev 7684)
@@ -2,6 +2,7 @@

 import java.io.BufferedOutputStream;
 import java.io.ByteArrayOutputStream;
+import java.io.File;
 import java.io.FileOutputStream;
 import java.io.IOException;
 import java.io.InputStream;
@@ -337,6 +338,7 @@
                                                        + runningCompressors
                                                        + ") running!");
                                        runningCompressors--;
+                                       new File(filename).delete();
                                        return;
                                }
                        }
@@ -344,7 +346,7 @@
                                System.err.println("Starting gzip " + filename);
                                Process r =
                                        Runtime.getRuntime().exec(
-                                               new String[] { "gzip", filename 
});
+                                               new String[] { "nice", "gzip", 
filename });
                                System.err.println("Started gzip " + filename);
                                InputStream is = r.getInputStream();
                                InputStream es = r.getErrorStream();
@@ -359,7 +361,9 @@
                                        } catch (IOException e) {
                                        }
                                        try {
-                                               r.exitValue();
+                                               if(r.exitValue() != 0) {
+                                                       new 
File(filename).delete();
+                                               }
                                                break;
                                        } catch (IllegalThreadStateException e) 
{
                                        }


Reply via email to