Changeset 10372


Ignore:
Timestamp:
2005-08-01T13:58:47+12:00 (19 years ago)
Author:
mdewsnip
Message:

Gatherer.setGLIUserDirectoryPath() now creates the directory if it doesn't exist.

Location:
trunk/gli/src/org/greenstone/gatherer
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/gli/src/org/greenstone/gatherer/Gatherer.java

    r10370 r10372  
    598598    {
    599599    gli_user_directory_path = gli_user_directory_path_arg;
     600
     601    // Ensure the GLI user directory exists
     602    File gli_user_directory = new File(gli_user_directory_path);
     603    if (!gli_user_directory.exists() && !gli_user_directory.mkdirs()) {
     604        System.err.println("Error: Unable to make directory: " + gli_user_directory);
     605    }
    600606    }
    601607
  • trunk/gli/src/org/greenstone/gatherer/GathererApplet.java

    r10367 r10372  
    107107    Gatherer.setGLIUserDirectoryPath(gli_user_directory_path);
    108108
    109     // Ensure the GLI user directory exists
    110         File gli_user_directory = new File(gli_user_directory_path);
    111     if (!gli_user_directory.exists() && !gli_user_directory.mkdirs()) {
    112         System.err.println("Error: Unable to make directory: " + gli_user_directory.toString());
    113     }
    114 
    115109    // If we're running as an applet we don't have a local GLI, so use the user directory path as the GLI path
    116110    Gatherer.setGLIDirectoryPath(gli_user_directory_path);
  • trunk/gli/src/org/greenstone/gatherer/GathererProg.java

    r10362 r10372  
    7171    Gatherer.setGLIUserDirectoryPath(gli_user_directory_path);
    7272
    73     // Ensure the GLI user directory exists
    74         File gli_user_directory = new File(gli_user_directory_path);
    75     if (!gli_user_directory.exists() && !gli_user_directory.mkdirs()) {
    76         System.err.println("Error: Unable to make directory: " + gli_user_directory.toString());
    77     }
    78 
    7973    // We have a local GLI
    8074    Gatherer.setGLIDirectoryPath(System.getProperty("user.dir") + File.separator);
Note: See TracChangeset for help on using the changeset viewer.