[jsword-svn] r1196 - in trunk/jsword/src/main/java/org/crosswire/jsword/book: install/sword sword

dmsmith at www.crosswire.org dmsmith at www.crosswire.org
Sat Dec 2 16:54:22 MST 2006


Author: dmsmith
Date: 2006-12-02 16:54:21 -0700 (Sat, 02 Dec 2006)
New Revision: 1196

Modified:
   trunk/jsword/src/main/java/org/crosswire/jsword/book/install/sword/AbstractSwordInstaller.java
   trunk/jsword/src/main/java/org/crosswire/jsword/book/sword/SwordBookDriver.java
   trunk/jsword/src/main/java/org/crosswire/jsword/book/sword/SwordBookPath.java
Log:
USB Drive changes

Modified: trunk/jsword/src/main/java/org/crosswire/jsword/book/install/sword/AbstractSwordInstaller.java
===================================================================
--- trunk/jsword/src/main/java/org/crosswire/jsword/book/install/sword/AbstractSwordInstaller.java	2006-12-02 22:44:00 UTC (rev 1195)
+++ trunk/jsword/src/main/java/org/crosswire/jsword/book/install/sword/AbstractSwordInstaller.java	2006-12-02 23:54:21 UTC (rev 1196)
@@ -102,7 +102,7 @@
      */
     public boolean isNewer(Book book)
     {
-        File dldir = SwordBookPath.getDownloadDir();
+        File dldir = SwordBookPath.getSwordDownloadDir();
 
         SwordBookMetaData sbmd = (SwordBookMetaData) book.getBookMetaData();
         File conf = new File(dldir, sbmd.getConfPath());
@@ -197,7 +197,7 @@
                     job.setInterruptable(false);
                     if (!job.isFinished())
                     {
-                        File dldir = SwordBookPath.getDownloadDir();
+                        File dldir = SwordBookPath.getSwordDownloadDir();
                         IOUtil.unpackZip(NetUtil.getAsFile(temp), dldir);
                         job.setProgress(Msg.JOB_CONFIG.toString());
                         sbmd.setLibrary(NetUtil.getURL(dldir));

Modified: trunk/jsword/src/main/java/org/crosswire/jsword/book/sword/SwordBookDriver.java
===================================================================
--- trunk/jsword/src/main/java/org/crosswire/jsword/book/sword/SwordBookDriver.java	2006-12-02 22:44:00 UTC (rev 1195)
+++ trunk/jsword/src/main/java/org/crosswire/jsword/book/sword/SwordBookDriver.java	2006-12-02 23:54:21 UTC (rev 1196)
@@ -146,7 +146,7 @@
     public boolean isDeletable(Book dead)
     {
         SwordBookMetaData sbmd = (SwordBookMetaData) dead.getBookMetaData();
-        File dlDir = SwordBookPath.getDownloadDir();
+        File dlDir = SwordBookPath.getSwordDownloadDir();
         File confFile = new File(dlDir, sbmd.getConfPath());
 
         // We can only uninstall what we download into our download dir.
@@ -160,7 +160,7 @@
     public void delete(Book dead) throws BookException
     {
         SwordBookMetaData sbmd = (SwordBookMetaData) dead.getBookMetaData();
-        File dlDir = SwordBookPath.getDownloadDir();
+        File dlDir = SwordBookPath.getSwordDownloadDir();
         File confFile = new File(dlDir, sbmd.getConfPath());
 
         // We can only uninstall what we download into our download dir.

Modified: trunk/jsword/src/main/java/org/crosswire/jsword/book/sword/SwordBookPath.java
===================================================================
--- trunk/jsword/src/main/java/org/crosswire/jsword/book/sword/SwordBookPath.java	2006-12-02 22:44:00 UTC (rev 1195)
+++ trunk/jsword/src/main/java/org/crosswire/jsword/book/sword/SwordBookPath.java	2006-12-02 23:54:21 UTC (rev 1196)
@@ -95,7 +95,7 @@
         ArrayList swordPath = new ArrayList();
 
         // The first place to look for Books
-        swordPath.add(getDownloadDir());
+        swordPath.add(getSwordDownloadDir());
 
         // Then all the user's augments
         if (augmentPath != null)
@@ -362,9 +362,11 @@
     }
 
     /**
+     * Get the download directory, which is either the one that the user chose
+     * or that JSword picked for the user.
      * @return Returns the download directory.
      */
-    public static File getDownloadDir()
+    public static File getSwordDownloadDir()
     {
         if (overrideDownloadDir != null)
         {
@@ -374,8 +376,16 @@
     }
 
     /**
-     * @param dlDir The download directory to set.
+     * @return Returns the download directory that the user chose.
      */
+    public static File getDownloadDir()
+    {
+        return overrideDownloadDir;
+    }
+
+    /**
+     * @param dlDir The download directory that the user specifies.
+     */
     public static void setDownloadDir(File dlDir)
     {
         if (!dlDir.getPath().equals("")) //$NON-NLS-1$




More information about the jsword-svn mailing list