Ignore:
Timestamp:
2004-01-23T09:40:26+13:00 (20 years ago)
Author:
jmt12
Message:

Have finalised the code for user specific settings under windows. I've tested on WinXP and Win98 with multiple users, and Win98 with a single user. Under single user the user.home is C:\Windows. Apparently its pretty common to just create an Application Data folder and put settings there, with or without multiple users. I'm not sure if thats true for WinXP, but I can't really tes that.

File:
1 edited

Legend:

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

    r6581 r6593  
    554554    }
    555555
     556    static final private String APPLICATION_DATA_FOLDER = "Application Data";
     557    static final private String UNIX_GLI_CONFIG_FOLDER = ".gli";
     558    static final private String USER_HOME_PROPERTY = "user.home";
     559    static final private String WIN_GLI_CONFIG_FOLDER = "Greenstone" + File.separator + "GLI";
     560
    556561    static public File getGLIUserFolder() {
    557     File gli_user_folder = new File(System.getProperty("user.home") + File.separator + ".gli" + File.separator);
     562    File gli_user_folder = null;
     563    if(Utility.isWindows()) {
     564        gli_user_folder = new File(System.getProperty(USER_HOME_PROPERTY) + File.separator + APPLICATION_DATA_FOLDER + File.separator + GLI_CONFIG_FOLDER + File.separator);
     565    }
     566    else {
     567        gli_user_folder = new File(System.getProperty(USER_HOME_PROPERTY) + File.separator + GLI_CONFIG_FOLDER + File.separator);
     568    }
    558569    return gli_user_folder;
    559570    }
Note: See TracChangeset for help on using the changeset viewer.