- Timestamp:
- 2018-06-02T19:25:11+02:00 (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/io/CachedFile.java
r13741 r13881 399 399 url = new URL(name); 400 400 if (!"file".equals(url.getProtocol())) { 401 String prefKey = getPrefKey(url, destDir , null);401 String prefKey = getPrefKey(url, destDir); 402 402 List<String> localPath = new ArrayList<>(Config.getPref().getList(prefKey)); 403 403 if (localPath.size() == 2) { … … 420 420 * @param url URL 421 421 * @param destDir destination directory 422 * @param parameter additional URL parameter (used e.g. for maps)423 422 * @return Preference key 424 423 */ 425 private static String getPrefKey(URL url, String destDir , String parameter) {424 private static String getPrefKey(URL url, String destDir) { 426 425 StringBuilder prefKey = new StringBuilder("mirror."); 427 426 if (destDir != null) { 428 427 prefKey.append(destDir).append('.'); 429 428 } 430 if (parameter != null) { 431 prefKey.append(url.toString().replaceAll("%<(.*)>", "")); 432 } else { 433 prefKey.append(url.toString()); 434 } 429 prefKey.append(url.toString().replaceAll("%<(.*)>", "")); 435 430 return prefKey.toString().replaceAll("=", "_"); 436 431 } 437 432 438 433 private File checkLocal(URL url) throws IOException { 439 String prefKey = getPrefKey(url, destDir , parameter);434 String prefKey = getPrefKey(url, destDir); 440 435 String urlStr = url.toExternalForm(); 441 436 if (parameter != null)
Note:
See TracChangeset
for help on using the changeset viewer.