Changeset 4829 in josm for trunk/src/org


Ignore:
Timestamp:
2012-01-20T20:26:46+01:00 (8 years ago)
Author:
bastiK
Message:

fixed #7291 - Can't use WMS layer in 4818

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/data/imagery/WmsCache.java

    r4813 r4829  
    5353    //TODO Do loading from partial cache and downloading at the same time, don't wait for partical cache to load
    5454
    55     private static final StringProperty PROP_CACHE_PATH = new StringProperty("imagery.wms-cache.path", new File(Main.pref.getCacheDirectory(), "wms").getPath());
     55    private static final StringProperty PROP_CACHE_PATH = new StringProperty("imagery.wms-cache.path", "wms");
    5656    private static final String INDEX_FILENAME = "index.xml";
    5757    private static final String LAYERS_INDEX_FILENAME = "layers.properties";
     
    9898    protected String cacheDirPath() {
    9999        String cPath = PROP_CACHE_PATH.get();
    100         if (!(cPath.startsWith("/") || cPath.startsWith(":/",1))) {
    101             //Not an absolute path
    102             cPath = Main.pref.getCacheDirectory() + cPath;
     100        if (!(new File(cPath).isAbsolute())) {
     101            cPath = Main.pref.getCacheDirectory() + File.separator + cPath;
    103102        }
    104103        return cPath;
Note: See TracChangeset for help on using the changeset viewer.