Author: jflesch
Date: 2006-10-29 17:06:15 +0000 (Sun, 29 Oct 2006)
New Revision: 10736

Modified:
   trunk/apps/Thaw/src/thaw/plugins/index/Index.java
Log:
Fix bug in Index.java, when removing a finished ClientPut from the queue

Modified: trunk/apps/Thaw/src/thaw/plugins/index/Index.java
===================================================================
--- trunk/apps/Thaw/src/thaw/plugins/index/Index.java   2006-10-29 15:26:56 UTC 
(rev 10735)
+++ trunk/apps/Thaw/src/thaw/plugins/index/Index.java   2006-10-29 17:06:15 UTC 
(rev 10736)
@@ -245,8 +245,10 @@

                if (tmpdir == null)
                        tmpdir = "";
+               else
+                       tmpdir = tmpdir + java.io.File.separator;

-               this.targetFile = new java.io.File(tmpdir + 
java.io.File.separator + this.toString()+".xml");
+               this.targetFile = new java.io.File(tmpdir + 
this.toString()+".xml");

                if (this.transfer != null) {
                        Logger.notice(this, "A transfer is already running");
@@ -535,10 +537,6 @@

                if(o == this.transfer) {
                        if(this.transfer.isFinished() && 
this.transfer.isSuccessful()) {
-
-                               if (this.transfer.stop(this.queueManager))
-                                       this.queueManager.remove(this.transfer);
-
                                if(this.transfer instanceof FCPClientPut) {
                                        if (this.targetFile != null)
                                                this.targetFile.delete();
@@ -550,6 +548,11 @@
                                                }
                                        }

+                                       
((FCPClientPut)this.transfer).deleteObserver(this);
+
+                                       if 
(this.transfer.stop(this.queueManager))
+                                               
this.queueManager.remove(this.transfer);
+
                                        this.transfer = null;

                                        this.setChanged();


Reply via email to