Opened 2 years ago
Last modified 2 years ago
#22689 reopened enhancement
Save as: File name extension should be adjusted when changing the file type.
Reported by: | Owned by: | team | |
---|---|---|---|
Priority: | normal | Milestone: | |
Component: | Core | Version: | tested |
Keywords: | template_report save file type name extension | Cc: |
Description
What steps will reproduce the problem?
I use JOSM in German, so I have to translate Menutexts,...
- Load GPX and convert it to Data plane
- Save as
What is the expected result?
I want to edit a name.gpx file and save it as a gpx file.
What happens instead?
The preset name is name.gpx.osm and the filetype is set to osm, even after changing the filetype to gpx-Files. I would expect it to be either name.gpx or name.osm depending of the file type selected
Please provide any additional information below. Attach a screenshot if possible.
Relative:URL: ^/trunk Repository:UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b Last:Changed Date: 2023-01-03 21:28:24 +0100 (Tue, 03 Jan 2023) Revision:18622 Build-Date:2023-01-04 02:30:56 URL:https://josm.openstreetmap.de/svn/trunk Identification: JOSM/1.5 (18622 de) Windows 10 64-Bit OS Build number: Windows 10 Pro 2009 (19044) Memory Usage: 318 MB / 4082 MB (114 MB allocated, but free) Java version: 19+36-2238, Oracle Corporation, Java HotSpot(TM) 64-Bit Server VM Look and Feel: com.sun.java.swing.plaf.windows.WindowsLookAndFeel Screen: \Display0 1920×1080 (scaling 1.00×1.00) \Display1 1080×1920 (scaling 1.00×1.00) Maximum Screen Size: 1920×1920 Best cursor sizes: 16×16→32×32, 32×32→32×32 System property file.encoding: UTF-8 System property sun.jnu.encoding: Cp1252 Locale info: de_DE Numbers with default locale: 1234567890 -> 1234567890 Dataset consistency test: No problems found Plugins: + undelete (36011) Tagging presets: + https://josm.openstreetmap.de/josmfile?page=Presets/Diving&zip=1 Last errors/warnings: - 00000.790 W: extended font config - overriding 'filename.Myanmar_Text=mmrtext.ttf' with 'MMRTEXT.TTF' - 00000.794 W: extended font config - overriding 'filename.Mongolian_Baiti=monbaiti.ttf' with 'MONBAITI.TTF'
Attachments (0)
Change History (8)
follow-up: 2 comment:1 by , 2 years ago
Resolution: | → worksforme |
---|---|
Status: | new → closed |
follow-up: 3 comment:2 by , 2 years ago
Replying to skyper:
If you convert a gpx layer to a data layer you can only save it as data file. You need to either edit the gpx layer or convert the data layer to gpx again to save it as gpx file.
I don't think that's necessary. I tested yesterday and you can save an OSM layer as GPX same way. It even autodetects the data type based on the filename. At least with my Java version 11.
comment:3 by , 2 years ago
Keywords: | file type name extension added |
---|---|
Resolution: | worksforme |
Status: | closed → reopened |
Summary: | Error on "Saving as" → Save as: File name extension should be adjusted when changing the file type. |
Version: | → tested |
Replying to stoecker:
Replying to skyper:
If you convert a gpx layer to a data layer you can only save it as data file. You need to either edit the gpx layer or convert the data layer to gpx again to save it as gpx file.
I don't think that's necessary. I tested yesterday and you can save an OSM layer as GPX same way. It even autodetects the data type based on the filename. At least with my Java version 11.
Oh yes, you are right.
So, when changing the file type in the save dialog the file name extension should be adjusted.
comment:4 by , 2 years ago
Keywords: | save added |
---|
comment:5 by , 2 years ago
Keywords: | save removed |
---|
Well. The name.gpx.osm is a perfectly fine name for me for an OSM file (even if a bit uncommon).
I'm still not clear about that ticket. Is it about the fact that there are two extensions or about the fact that it should have saved gpx, but did not (which worked for me fine).
comment:6 by , 2 years ago
Keywords: | save added |
---|
comment:7 by , 2 years ago
Hi,
yes you can save a gpx, if the data layer only contains a converted gpx File. I use it to edit gpx Files, like deleting points which are wrong because there was no connection,... It helps to put the map in the background.
The minor error is, that I would prefer if the export to OSM would create name.osm, but if you think name.gpx.osm is better, so fine with me. But deffinetely if you change the type to gpx, there should be no osm in the filename.
comment:8 by , 2 years ago
It seems file dialog uses following logic:
- When the extension makes sense use the extension to determine the output
- When not use the selected data type
It think there is not much we can do here which will improve the logic.
Second topic: Multiple extensions are no bug. E.g. I personally when having an input file name.ext and convert this to other formats I'd use name name.ext.newext, so name.osm.gpx is a perfectly fine name for me when name.osm was the input and I converted it to gpx format.
If you don't want a second extension simply strip extensions when saving. E.g. When you have "name" as name and "GPX" as type you'll get a file name.gpx. Same as when you enter name.gpx as the name.
If you convert a gpx layer to a data layer you can only save it as data file. You need to either edit the gpx layer or convert the data layer to gpx again to save it as gpx file.