Skip to content

root and rootalias don't sanitize the same way (trailing slash) #1142

@elvanor

Description

@elvanor

I have thoroughly read the Reporting Bugs and Feature Requests wiki page.

Environment

  • Unison version: 2.53.7
  • Gentoo Linux, AMD
  • ocaml version: 4.14.2
  • TUI or GUI: GUI (does not matter)
  • local, ssh, socket: local
  • use of fsmonitor: Not sure (irrelevant)

Reproduction Recipe

Use root & rootalias. For instance my test profile is:

Unison preferences file

root = /mnt/data/games/amiga/
root = /tmp/amiga/
rootalias = //caradhras//mnt/data/games/amiga/ -> //gagaxxx//mnt/data/games/amiga/
rootalias = //caradhras//tmp/amiga/ -> //gagaxxx//tmp/amiga
logfile = /tmp/unison-test.log
watch = false
ignore = Path lost+found

Expected behavior vs actual behavior

If you run with UNISONLOCALHOSTNAME="caradhras" unison -showarchive, you will see that the caradhras hostname is not replaced by gagaxxx in the archive paths. This is because it uses root = /mnt/data/games/amiga (removed trailing slash) but rootalias = //caradhras//mnt/data/games/amiga/ (trailing slash present). So it does not match.

Metadata

Metadata

Assignees

No one assigned

    Labels

    defectunison fails to meet its specification (but doesn't crash; see also "crash")effort-mediumissue is likely resolvable with <= 20h of effortimpact-lowlow importance

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions