Changeset 16144 in josm


Ignore:
Timestamp:
2020-03-15T21:59:03+01:00 (4 years ago)
Author:
Don-vip
Message:

fix #18936 - fix layer name detection of Overpass xapi URLs

Location:
trunk/src/org/openstreetmap/josm
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/actions/downloadtasks/DownloadOsmTask.java

    r15789 r16144  
    189189        if (newLayerName == null || newLayerName.isEmpty()) {
    190190            Matcher matcher = Pattern.compile(pattern).matcher(url);
    191             newLayerName = matcher.matches() && matcher.groupCount() > 0 ? matcher.group(1) : null;
     191            newLayerName = matcher.matches() && matcher.groupCount() > 0 ? Utils.decodeUrl(matcher.group(1)) : null;
    192192        }
    193193    }
  • trunk/src/org/openstreetmap/josm/io/UrlPatterns.java

    r15784 r16144  
    139139        OVERPASS_API_URL        (".*/interpreter\\?data=.*"),
    140140        /** URL of Overpass API (XAPI compatibility) */
    141         OVERPASS_API_XAPI_URL   (".*/xapi(\\?.*\\[@meta\\]|_meta\\?).*"),
     141        OVERPASS_API_XAPI_URL   (".*/xapi(?:\\?.*\\[@meta\\]|_meta\\?)(.*)"),
    142142        /** URL of remote .osm file */
    143143        EXTERNAL_OSM_FILE       (".*/(.*\\.osm)"),
Note: See TracChangeset for help on using the changeset viewer.