Trailing slash on "init" confuses attic
SpiritQuaddicted opened this issue · 2 comments
SpiritQuaddicted commented
Mind the trailing slashes in this. It all would have worked fine if I had initially left it off but it seems that attic itself gets confused. Not sure what the behaviour should be but when I posted it to IRC earlier, it was suggested to post as bug here.
$ attic init /mnt/hdd/atticbk/
Initializing repository at "/mnt/hdd/atticbk/"
$ attic create /mnt/hdd/atticbk::`date +%Y-%m-%d_%H%M%S` /home/me/somedir
Warning: The repository at location /mnt/hdd/atticbk was previously located at /mnt/hdd/atticbk/
attic: Error: Repository access aborted
$ attic init /mnt/hdd/atticbk
Initializing repository at "/mnt/hdd/atticbk"
attic: Error: Repository /mnt/hdd/atticbk already exists
$ attic create /mnt/hdd/atticbk/::`date +%Y-%m-%d_%H%M%S` /home/me/somedir
this works fine
ThomasWaldmann commented
+1 - I just had same effect.
Note: when using tab completion on pathes, bash adds the trailing slash for directories, so line 2 of above somehow comes naturally.
@jborg maybe Location.__init__
or Location.canonical_path
should strip trailing slashes from pathes.