[jsword-svn] jsword/java/jsword/org/crosswire/jsword/book/install/sword s

jswordcvs at crosswire.org jswordcvs at crosswire.org
Mon Mar 7 19:31:48 MST 2005


Update of /cvs/jsword/jsword/java/jsword/org/crosswire/jsword/book/install/sword
In directory www.crosswire.org:/tmp/cvs-serv23386/java/jsword/org/crosswire/jsword/book/install/sword

Modified Files:
	AbstractSwordInstaller.java 
Log Message:
Improved the Job class allowing for cooperative interruption.
Fixed the download cancel. Improved the cancel of indexing.
It works but you have to restart to try to index again.

Index: AbstractSwordInstaller.java
===================================================================
RCS file: /cvs/jsword/jsword/java/jsword/org/crosswire/jsword/book/install/sword/AbstractSwordInstaller.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** AbstractSwordInstaller.java	6 Mar 2005 20:21:47 -0000	1.6
--- AbstractSwordInstaller.java	8 Mar 2005 02:31:45 -0000	1.7
***************
*** 164,172 ****
                      download(job, directory + '/' + PACKAGE_DIR, sbmd.getInitials() + ZIP_SUFFIX, temp);
  
                      File dldir = SwordBookDriver.getDownloadDir();
!                     IOUtil.unpackZip(NetUtil.getAsFile(temp), dldir);
  
-                     job.setProgress(Msg.JOB_CONFIG.toString());
-                     SwordBookDriver.registerNewBook(sbmd, dldir);
                  }
                  catch (Exception ex)
--- 164,177 ----
                      download(job, directory + '/' + PACKAGE_DIR, sbmd.getInitials() + ZIP_SUFFIX, temp);
  
+                     // Once the unzipping is started, we need to continue
+                     job.setInterruptable(false);
                      File dldir = SwordBookDriver.getDownloadDir();
!                     if (!job.isFinished())
!                     {
!                         IOUtil.unpackZip(NetUtil.getAsFile(temp), dldir);
!                         job.setProgress(Msg.JOB_CONFIG.toString());
!                         SwordBookDriver.registerNewBook(sbmd, dldir);
!                     }
  
                  }
                  catch (Exception ex)



More information about the jsword-svn mailing list