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

jswordcvs at crosswire.org jswordcvs at crosswire.org
Tue Oct 5 15:03:11 MST 2004


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

Modified Files:
	HttpSwordInstaller.java FtpSwordInstaller.java 
Log Message:
Improvments on reading SwordBookMetaData

Index: HttpSwordInstaller.java
===================================================================
RCS file: /cvs/jsword/jsword/java/jsword/org/crosswire/jsword/book/install/sword/HttpSwordInstaller.java,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -d -r1.9 -r1.10
*** HttpSwordInstaller.java	2 Oct 2004 14:01:42 -0000	1.9
--- HttpSwordInstaller.java	5 Oct 2004 22:03:09 -0000	1.10
***************
*** 286,290 ****
                      File confdir = new File(dldir, SwordConstants.DIR_CONF);
                      confdir.mkdirs();
!                     File conf = new File(confdir, sbmd.getInternalName() + SwordConstants.EXTENSION_CONF);
                      URL configurl = new URL(NetUtil.PROTOCOL_FILE, null, conf.getAbsolutePath());
                      sbmd.save(configurl);
--- 286,290 ----
                      File confdir = new File(dldir, SwordConstants.DIR_CONF);
                      confdir.mkdirs();
!                     File conf = new File(confdir, sbmd.getDiskName() + SwordConstants.EXTENSION_CONF);
                      URL configurl = new URL(NetUtil.PROTOCOL_FILE, null, conf.getAbsolutePath());
                      sbmd.save(configurl);
***************
*** 356,360 ****
          URL local = toLocalURL(bmd);
          SwordBookMetaData sbmd = (SwordBookMetaData) bmd;
!         local = NetUtil.lengthenURL(local, sbmd.getInternalName() + SwordConstants.EXTENSION_CONF);
          URL remote = toRemoteURL(bmd);
          return NetUtil.isNewer(remote, local);
--- 356,360 ----
          URL local = toLocalURL(bmd);
          SwordBookMetaData sbmd = (SwordBookMetaData) bmd;
!         local = NetUtil.lengthenURL(local, sbmd.getDiskName() + SwordConstants.EXTENSION_CONF);
          URL remote = toRemoteURL(bmd);
          return NetUtil.isNewer(remote, local);
***************
*** 376,380 ****
          ModuleType type = sbmd.getModuleType();
          String modpath = type.getInstallDirectory();
!         String destname = modpath + '/' + sbmd.getInternalName();
  
          File dldir = SwordBookDriver.getDownloadDir();
--- 376,380 ----
          ModuleType type = sbmd.getModuleType();
          String modpath = type.getInstallDirectory();
!         String destname = modpath + '/' + sbmd.getDiskName();
  
          File dldir = SwordBookDriver.getDownloadDir();

Index: FtpSwordInstaller.java
===================================================================
RCS file: /cvs/jsword/jsword/java/jsword/org/crosswire/jsword/book/install/sword/FtpSwordInstaller.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** FtpSwordInstaller.java	2 Oct 2004 14:01:42 -0000	1.6
--- FtpSwordInstaller.java	5 Oct 2004 22:03:09 -0000	1.7
***************
*** 127,131 ****
          ModuleType type = sbmd.getModuleType();
          String modpath = type.getInstallDirectory();
!         String destname = modpath + '/' + sbmd.getInternalName();
  
          File dldir = SwordBookDriver.getDownloadDir();
--- 127,131 ----
          ModuleType type = sbmd.getModuleType();
          String modpath = type.getInstallDirectory();
!         String destname = modpath + '/' + sbmd.getDiskName();
  
          File dldir = SwordBookDriver.getDownloadDir();
***************
*** 193,197 ****
                      ModuleType type = sbmd.getModuleType();
                      String modpath = type.getInstallDirectory();
!                     String destname = modpath + '/' + sbmd.getInternalName();
                      downloadAll(job, host, USERNAME, PASSWORD, directory + '/' + SwordConstants.DIR_DATA + '/' + destname, desturl);
  
--- 193,197 ----
                      ModuleType type = sbmd.getModuleType();
                      String modpath = type.getInstallDirectory();
!                     String destname = modpath + '/' + sbmd.getDiskName();
                      downloadAll(job, host, USERNAME, PASSWORD, directory + '/' + SwordConstants.DIR_DATA + '/' + destname, desturl);
  
***************
*** 200,204 ****
                      File confdir = new File(dldir, SwordConstants.DIR_CONF);
                      confdir.mkdirs();
!                     File conf = new File(confdir, sbmd.getInternalName() + SwordConstants.EXTENSION_CONF);
                      URL configurl = new URL(NetUtil.PROTOCOL_FILE, null, conf.getAbsolutePath());
                      sbmd.save(configurl);
--- 200,204 ----
                      File confdir = new File(dldir, SwordConstants.DIR_CONF);
                      confdir.mkdirs();
!                     File conf = new File(confdir, sbmd.getDiskName() + SwordConstants.EXTENSION_CONF);
                      URL configurl = new URL(NetUtil.PROTOCOL_FILE, null, conf.getAbsolutePath());
                      sbmd.save(configurl);



More information about the jsword-svn mailing list