Changeset 14622 in josm for trunk


Ignore:
Timestamp:
2018-12-31T18:30:23+01:00 (6 years ago)
Author:
Don-vip
Message:

fix #17160 - don't open local files with custom browser

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/tools/PlatformHookWindows.java

    r14511 r14622  
    196196    @Override
    197197    public void openUrl(String url) throws IOException {
    198         final String customBrowser = Config.getPref().get("browser.windows", null);
    199         if (customBrowser != null) {
    200             Runtime.getRuntime().exec(new String[]{customBrowser, url});
    201             return;
     198        if (!url.startsWith("file:/")) {
     199            final String customBrowser = Config.getPref().get("browser.windows", "");
     200            if (!customBrowser.isEmpty()) {
     201                Runtime.getRuntime().exec(new String[]{customBrowser, url});
     202                return;
     203            }
    202204        }
    203205        try {
Note: See TracChangeset for help on using the changeset viewer.