Skip to content

Refine the different overwrite transfer arguments #624

@JoeZiminski

Description

@JoeZiminski

Currently the transfer overwrite arguments are never (never overwrite), always (always overwrite) and if_source_newer (overwrite only if source is newer).

These map to the Rclone arguments like:

    if name == "never_overwrite":
        arg = "--ignore-existing"

    if name == "if_source_newer_overwrite":
        arg = "--update"

and always uses the default behaviour, which is actually to only copy if the mod time or checksum differs.

This means that always is a little misleading, it will not copy if the mod time and checksum are the same. Practically this will have little effect but it would be good to expose more of the rlcone parametrs to make clearer to the user what is happening. For example:

  1. to always transfer, the flag --ignore-times should also be used
  2. this is separate to if_different (which will only transfer if date are different or checksum)
  3. if_source_newer uses --update which will skip transfer if the target is newer than the source.
  4. There is also an --ignore-checksum argument, but I don't think it's worth exposing this.

In sum, the key area of confusion is that always does not always transfer. Always should use --ignore-times and a new entry if_different should be introduced that uses the default Rclone behaviour and will only transfer if mod time or checksum differ.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions