Changeset 18662

Show
Ignore:
Timestamp:
11.03.2009 13:55:29 (10 years ago)
Author:
kjdon
Message:

changed collectionDatabaseFile method. if type is jdbm, then use jdb instead of db, and if type is gdbm, use gdb instead of ldb/bdb

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • greenstone3/trunk/src/java/org/greenstone/gsdl3/util/GSFile.java

    r17713 r18662  
    289289    } 
    290290 
    291     /** the collection database file -  
    292      * note, need to change extension depending on OS and database type */ 
    293     // The perl code can't detect big vs little endian on a Mac, so the Perl 
    294     // code will always name the gdbm db file .bdb on a Mac whether its little 
    295     // endian or not. A Mac little endian file is NOT the same as a Linux  
    296     // little endian file 
    297   // jdbm files are endian independent ?? 
     291  /** the collection database file - */ 
    298292    static public String collectionDatabaseFile(String site_home,  
    299293                        String collection_name, 
     
    303297        String db_ext = null; 
    304298    if (database_type.equalsIgnoreCase("jdbm")) { 
    305       db_ext = ".db"; 
     299      db_ext = ".jdb"; 
    306300    } else { 
    307301      // assume gdbm 
    308       db_ext = ".ldb"; 
    309        
    310       // No longer default all Macs to .bdb extension regardless of what endian,  
    311       // they are since the Misc.isBigEndian() method does return little endian  
    312       // for rata (Intel Mac) and big endian for shuttle (Power PC). 
    313       if (Misc.isBigEndian()) { // if (Misc.isMac() || Misc.isBigEndian()) { 
    314         db_ext = ".bdb"; 
    315       } 
    316     }  
    317      
     302      db_ext = ".gdb"; 
     303    } 
     304         
    318305    return site_home + File.separatorChar + 
    319306        "collect" + File.separatorChar +