Ignore:
Timestamp:
2018-08-12T14:45:46+02:00 (16 months ago)
Author:
Don-vip
Message:

see #15229 - code refactoring - add PlatformHook.getPossiblePreferenceDirs()

File:
1 edited

Legend:

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

    r14138 r14144  
    281281        addPossibleResourceDir(locations, getSystemEnv("JOSM_RESOURCES"));
    282282        addPossibleResourceDir(locations, getSystemProperty("josm.resources"));
    283         if (PlatformManager.isPlatformWindows()) {
    284             String appdata = getSystemEnv("APPDATA");
    285             if (appdata != null && getSystemEnv("ALLUSERSPROFILE") != null
    286                     && appdata.lastIndexOf(File.separator) != -1) {
    287                 appdata = appdata.substring(appdata.lastIndexOf(File.separator));
    288                 locations.add(new File(new File(getSystemEnv("ALLUSERSPROFILE"),
    289                         appdata), "JOSM").getPath());
    290             }
    291         } else {
    292             locations.add("/usr/local/share/josm/");
    293             locations.add("/usr/local/lib/josm/");
    294             locations.add("/usr/share/josm/");
    295             locations.add("/usr/lib/josm/");
    296         }
     283        locations.addAll(PlatformManager.getPlatform().getPossiblePreferenceDirs());
    297284        return locations;
    298285    }
Note: See TracChangeset for help on using the changeset viewer.