Ignore:
Timestamp:
2013-11-28T23:34:57+01:00 (11 years ago)
Author:
simon04
Message:

JOSM/DirectDownload: download gzipped/bzip2ed tracks - fix #josm9341

Location:
applications/editors/josm/plugins/DirectDownload
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/DirectDownload/build.xml

    r29854 r30102  
    44    <property name="commit.message" value="Commit message"/>
    55    <!-- enter the *lowest* JOSM version this plugin is currently compatible with -->
    6     <property name="plugin.main.version" value="6162"/>
     6    <property name="plugin.main.version" value="6421"/>
    77
    88    <!-- Configure these properties (replace "..." accordingly).
  • applications/editors/josm/plugins/DirectDownload/src/org/openstreetmap/josm/plugins/directdownload/DirectDownload.java

    r29776 r30102  
    1818import org.openstreetmap.josm.plugins.Plugin;
    1919import org.openstreetmap.josm.plugins.PluginInformation;
     20import org.openstreetmap.josm.tools.Utils;
    2021import org.xml.sax.SAXException;
    2122
     
    5253                try {
    5354                    URL trackDataUrl = new URL(urlString);
    54                     InputStream is = trackDataUrl.openStream();
     55                    InputStream is = Utils.openURLAndDecompress(trackDataUrl, true);
    5556
    5657                    GpxReader r = new GpxReader(is);
     
    7778                            tr("Invalid URL {0}", urlString));
    7879                } catch (java.io.IOException e) {
     80                    e.printStackTrace();
    7981                    JOptionPane.showMessageDialog(Main.parent,
    8082                            tr("Error fetching URL {0}", urlString));
    8183                } catch (SAXException e) {
     84                    e.printStackTrace();
    8285                    JOptionPane.showMessageDialog(Main.parent,
    8386                            tr("Error parsing data from URL {0}", urlString));
Note: See TracChangeset for help on using the changeset viewer.