Changeset 9876
- Timestamp:
- 2005-05-16T11:28:47+12:00 (19 years ago)
- Location:
- trunk/gli/src/org/greenstone/gatherer
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gli/src/org/greenstone/gatherer/GathererApplet.java
r9691 r9876 100 100 } 101 101 102 // Ensure the GLI user directory exists103 File gli_user_directory = Utility.getGLIUserFolder();104 if (!gli_user_directory.exists()) {105 gli_user_directory.mkdirs();106 }107 108 102 String gwcgi = getParameter("gwcgi"); 109 103 String library_cgi = fullLibraryURL(gwcgi); … … 111 105 String cgi_base = library_cgi.substring(0,cgi_base_cut+1); 112 106 107 String windows_home = getParameter("windowsHome"); 108 File gli_user_directory = Utility.setGLIUserFolder(windows_home); 109 if (!gli_user_directory.exists()) { 110 gli_user_directory.mkdirs(); 111 } 112 113 113 gatherer = new Gatherer(); 114 114 … … 118 118 119 119 GetOpt go = new GetOpt(args); 120 121 String debug_param = getParameter("debug"); 122 123 if ((debug_param != null) && (debug_param.matches("true"))) { 124 go.debug = true; 125 } 120 126 121 127 if (go.feedback_enabled) { -
trunk/gli/src/org/greenstone/gatherer/util/Utility.java
r9437 r9876 122 122 static final public String XML_DIRECTORY = "xml" + File.separator; 123 123 124 static protected File gli_user_folder = null; 125 124 126 // These are out of alphabetic order to avoid forward reference error. 125 127 /** The default icon to produce a 'help-icon' sized blank space before a menu entry. */ … … 407 409 static final private String WIN_GLI_CONFIG_FOLDER = "Greenstone" + File.separator + "GLI"; 408 410 411 static public File setGLIUserFolder(String windows_home) { 412 gli_user_folder = null; 413 if(Utility.isWindows()) { 414 if ((windows_home != null) && (windows_home != "")) { 415 gli_user_folder = new File(windows_home + File.separator + "GLI" + File.separator); 416 } 417 else { 418 gli_user_folder = new File(System.getProperty(USER_HOME_PROPERTY) + File.separator + APPLICATION_DATA_FOLDER + File.separator + WIN_GLI_CONFIG_FOLDER + File.separator); 419 } 420 } 421 else { 422 gli_user_folder = new File(System.getProperty(USER_HOME_PROPERTY) + 423 File.separator + UNIX_GLI_CONFIG_FOLDER + File.separator); 424 } 425 return gli_user_folder; 426 } 427 409 428 static public File getGLIUserFolder() 410 429 { 411 if (Utility.isWindows()) { 412 return new File(System.getProperty(USER_HOME_PROPERTY) + File.separator + APPLICATION_DATA_FOLDER + File.separator + WIN_GLI_CONFIG_FOLDER + File.separator); 413 } 414 else { 415 return new File(System.getProperty(USER_HOME_PROPERTY) + File.separator + UNIX_GLI_CONFIG_FOLDER + File.separator); 416 } 430 return gli_user_folder; 417 431 } 418 432
Note:
See TracChangeset
for help on using the changeset viewer.