Changeset 17121 for gli


Ignore:
Timestamp:
2008-09-01T16:50:03+12:00 (16 years ago)
Author:
ak19
Message:

Gatherer ensures that the GLI user cache directory exists, so that the Downloaded Files folder in the WorkspaceTree view is visible. No refresh of the Workspace window is needed when a download is performed

File:
1 edited

Legend:

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

    r16993 r17121  
    368368        if (GS3 && Configuration.servlet_path == null) {
    369369        Configuration.servlet_path = servlet_config.getServletPath(Configuration.site_name);
     370        }
     371         
     372        // ensure that a directory called 'cache' exists in the GLI user directory 
     373        File user_cache_dir = new File(Gatherer.getGLIUserCacheDirectoryPath());
     374        System.err.println("User cache dir: " + Gatherer.getGLIUserCacheDirectoryPath());
     375        if (!user_cache_dir.exists() && !user_cache_dir.mkdir()) {
     376        System.err.println("Warning: Unable to make directory: " + user_cache_dir);
    370377        }
    371378
Note: See TracChangeset for help on using the changeset viewer.