Author: jflesch
Date: 2006-09-29 13:22:42 +0000 (Fri, 29 Sep 2006)
New Revision: 10563

Modified:
   trunk/apps/Thaw/src/thaw/fcp/FCPClientPut.java
Log:
Fix CHK keys when inserting

Modified: trunk/apps/Thaw/src/thaw/fcp/FCPClientPut.java
===================================================================
--- trunk/apps/Thaw/src/thaw/fcp/FCPClientPut.java      2006-09-29 12:29:41 UTC 
(rev 10562)
+++ trunk/apps/Thaw/src/thaw/fcp/FCPClientPut.java      2006-09-29 13:22:42 UTC 
(rev 10563)
@@ -400,7 +400,10 @@
                        progress = 0;
                        running = true;

-                       status = "Inserting";
+                       if (!getCHKOnly)
+                               status = "Inserting";
+                       else
+                               status = "Computing";

                        setChanged();
                        notifyObservers();
@@ -533,10 +536,8 @@
                                finished = false;
                                successful = false;

-                               if(keyType == 0)
-                                       publicKey = msg.getValue("URI") + "/" + 
getFilename();
-                               else
-                                       publicKey = msg.getValue("URI");
+                               publicKey = msg.getValue("URI");
+
                                publicKey = publicKey.replaceAll("freenet:", 
"");

                                Logger.info(this, "URIGenerated: "+publicKey);
@@ -707,7 +708,10 @@
                                        //if(fileSize == 0)
                                        //      fileSize = BLOCK_SIZE * 
required; // NOT RELIABLE

-                                       status = "Inserting";
+                                       if (!getCHKOnly)
+                                               status = "Inserting";
+                                       else
+                                               status = "Computing";

                                        setChanged();
                                        notifyObservers();
@@ -830,7 +834,6 @@
         * @return public key
         */
        public String getFileKey() {
-
                return publicKey;
        }

@@ -844,7 +847,7 @@
                if(keyType == 0 && publicKey != null)
                        key = publicKey;
                if(keyType == 0 && publicKey == null)
-                       key = "CHK at coinCoin/"+name;
+                       key = "CHK@";
                if(keyType == 1)
                        key = "KSK@" + name + "-"+ Integer.toString(rev);
                if(keyType == 2)


Reply via email to