Ignore:
Timestamp:
2005-02-18T10:49:48+13:00 (19 years ago)
Author:
mdewsnip
Message:

Now ensures that the GLI user directory exists for both main program and applet.

File:
1 edited

Legend:

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

    r9058 r9092  
    2929
    3030import java.awt.*;
     31import java.io.*;
    3132import java.util.*;
    3233import javax.swing.*;
    3334import org.greenstone.gatherer.feedback.ActionRecorderDialog;
    3435import org.greenstone.gatherer.gui.GUIManager;
     36import org.greenstone.gatherer.util.Utility;
    3537
    3638
     
    5456     * @see org.greenstone.gatherer.Dictionary
    5557     * @see org.greenstone.gatherer.Gatherer
    56      * @see org.greenstone.gatherer.Gatherer
    5758     */
    5859    static public void main(String[] args) {
     
    6768        UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
    6869    }
    69     catch(Exception exception) {
     70    catch (Exception exception) {
    7071        exception.printStackTrace();
    7172    }
    72    
     73
     74    // Ensure the GLI user directory exists
     75    File gli_user_directory = Utility.getGLIUserFolder();
     76    if (!gli_user_directory.exists()) {
     77        gli_user_directory.mkdirs();
     78    }
     79
    7380    Gatherer gatherer = new Gatherer();
    7481
Note: See TracChangeset for help on using the changeset viewer.