Modify

Opened 3 years ago

Closed 3 years ago

Last modified 3 years ago

#20484 closed defect (fixed)

PBF plugin FILE_FILTER too strict

Reported by: blackboxlogic@… Owned by: Don-vip
Priority: normal Milestone:
Component: Plugin pbf Version:
Keywords: template_report Cc:

Description

What steps will reproduce the problem?

  1. download a pbf from any source (on windows)
  2. download the same pbf or another with the same name (note that windows will use a file name like "myData.osm(2).pbf")
  3. try to open the second file in JOSM
  4. Get error message:

Cannot open 1 file because file does not exist or no suitable file importer is available.
C:\Users\<user>\Downloads\myData.osm(2).pbf (no importer)

What is the expected result?

I expect josm to open the file

What happens instead?

It said NO because it expects file names like "*.osm.pbf" and windows stuck a "(2)" in there.

Please provide any additional information below. Attach a screenshot if possible.

Source of issue: https://github.com/openstreetmap/josm-plugins/blob/efc3157855f357e2a6d9a1800c75d91b9d4bad29/pbf/src/org/openstreetmap/josm/plugins/pbf/PbfConstants.java#L17
Please consider changing the file name filter to either "*.pbf" or "*.osm\(?\d*\)?.pbf"

Relative:URL: ^/trunk
Repository:UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b
Last:Changed Date: 2020-12-28 22:03:23 +0100 (Mon, 28 Dec 2020)
Revision:17428
Build-Date:2020-12-29 02:30:53
URL:https://josm.openstreetmap.de/svn/trunk

Identification: JOSM/1.5 (17428 en) Windows 10 64-Bit
OS Build number: Windows 10 Home 1909 (18363)
Memory Usage: 2048 MB / 2048 MB (667 MB allocated, but free)
Java version: 13.0.2+8, AdoptOpenJDK, OpenJDK 64-Bit Server VM
Look and Feel: com.sun.java.swing.plaf.windows.WindowsLookAndFeel
Screen: \Display0 3840×2160 (scaling 2.50×2.50)
Maximum Screen Size: 3840×2160
Best cursor sizes: 16×16→64×64, 32×32→64×64
Dataset consistency test: No problems found

Plugins:
+ pbf (35650)
+ list has been shortened to only relevent data.

Last errors/warnings:
- 00037.002 W: Warning - <html>Cannot open 1 file because file does not exist or no suitable file importer is available.<br><ul><li>%UserProfile%\Downloads\maine-latest-internal.osm(3).pbf (<i>no importer</i>)</li></ul></html>
- 00061.806 W: Warning - <html>Cannot open 1 file because file does not exist or no suitable file importer is available.<br><ul><li>%UserProfile%\Downloads\maine-latest-internal.osm(3).pbf (<i>no importer</i>)</li></ul></html>

Attachments (0)

Change History (7)

comment:1 by GerdP, 3 years ago

+1, looking for ".pbf" should do fine

comment:2 by GerdP, 3 years ago

Resolution: fixed
Status: newclosed

In 35708/osm:

fix #20484: PBF plugin FILE_FILTER too strict
-change filter from .osm.pbf to just .pbf

comment:3 by GerdP, 3 years ago

In 35709/osm:

fix #20484: PBF plugin FILE_FILTER too strict
-dist

comment:4 by blackboxlogic@…, 3 years ago

Thank you!

comment:5 by GerdP, 3 years ago

I just noticed that this has a side effect: When you safe files in pbf format the name is now x.pbf instead of x.osm.pbf

comment:6 by GerdP, 3 years ago

In 35720/osm:

see #20484: PBF plugin FILE_FILTER too strict

  • revert 35708/osm
  • use pbf only in the list accepted extensions so that osm.pbf is used as default again

comment:7 by GerdP, 3 years ago

In 35721/osm:

see #20484: PBF plugin FILE_FILTER too strict
dist

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Don-vip.
as The resolution will be set.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.