Skip to content

No early-exit when target file exists during osmium cat #311

@tobschli

Description

@tobschli

What version of osmium-tool are you using?

osmium version 1.19.0
libosmium version 2.23.0
Supported PBF compression types: none zlib lz4

What operating system version are you using?

Linux: 6.18.18-1-MANJARO

Tell us something about your system

Probably not relevant in this case

What did you do exactly?

  1. I have a valid planet.osm.pbf file (Region US from geofabrik):
➜ ls
planet.osm.pbf
  1. I convert it to another format (e.g. .osm.bz2):
➜ osmium cat -o planet.osm.bz2 planet.osm.pbf --progress
[>                                                                       0%
  1. I cancel this operation with ^C
  2. The target file was created (although not complete, as I aborted the conversion):
➜ ls
planet.osm.bz2  planet.osm.pbf
  1. When restarting this process, the tool seems to be stuck, as no progress is reported:
➜ osmium cat -o planet.osm.bz2 planet.osm.pbf --progress

The same behavior also appears when the source (or target) file are not readable / writable from the executing user.

What did you expect to happen?

I expected an error that it is not supported to overwrite files.
In the latter case, I expect an error that the file is not readable / writable.

What did happen instead?

osmium hangs until the process is destroyed by the user.

What did you do to try analyzing the problem?

I could confirm that conversion progress works as expected, when the target file was not present beforehand.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions