Skip to content

[sda-cli download] -continue flag behaviour is misleading #567

@KarlG-nbis

Description

@KarlG-nbis

The behaviour of the -continue flag can be misleading. If "continue" flag is true any existing files being downloaded are skipped and not overwritten, but all files are downloaded. While its false all files are downloaded and it will overwrite any potential existing files.

So in both scenarios, execution of downloding other files continues if file being downloaded exists. But in one scenario file is overwritten, and in the other existing file is perserved.

The description of flag: "Skip already downloaded files and continue with downloading the rest." Does not clearly indicate the behaviour if flag is false.

https://github.com/NBISweden/sda-cli/blob/main/download/download.go#L334

Suggested solution

Rename flag to be more explicit in its behaviour, eg rename to "force-overwrite": "Force overwrite existing files"

Acceptence criteria

  • Tests verifying the feature is added
  • The expected behaviour, description, and name of the flag is clear

Additonal context

Introduced by #542

Estimation of size: small

Estimation of priority: low

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions