Changeset 14133 in osm for applications/editors/josm


Ignore:
Timestamp:
2009-03-19T20:57:38+01:00 (16 years ago)
Author:
stoecker
Message:

fix #2273 - DirectUpload crashes trying to upload converted GPX - patch by xeen

File:
1 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/DirectUpload/src/org/openstreetmap/josm/plugins/DirectUpload/UploadDataGui.java

    r14109 r14133  
    148148            if(mv.getActiveLayer() instanceof GpxLayer) {
    149149                GpxData data=((GpxLayer)Main.map.mapView.getActiveLayer()).data;
    150                 filename = data.storageFile.getName()
    151                                 .replaceAll("[&?/\\\\]"," ").replaceAll("(\\.[^.]*)$","");
     150                try {
     151                    filename = data.storageFile.getName()
     152                                    .replaceAll("[&?/\\\\]"," ").replaceAll("(\\.[^.]*)$","");
     153                } catch(Exception e) { }
    152154                descriptionField.setText(getFilename());
    153155                OutputDisplay.setText(tr("Selected track: {0}", getFilename()));
Note: See TracChangeset for help on using the changeset viewer.