TMSU
TMSU copied to clipboard
the same file under two different paths (with symlinks) is not recognized as one
An option to change that would very useful. For example:
$ mkdir test; ln -s test test2; cd test2/; touch file; tmsu tag file atag; tmsu tags file
atag
$ cd -P . ; tmsu tags file # called from ~/test/, nothing printed
$
If this is intended behavior, it would be great to have an option to get paths normalized in the database, so that tags do not depend on the specific path used at tag creation time or at query time.
Hi, thanks for the suggestion.
I made the tag
command follow symlinks already, I guess it would make sense for the other commands to do so too (gap). I'll take a look.
The tag
subcommand doesn't fully handle symlinked directories. In my test case, $HOME/Downloads is a symlink to "/mnt/d/Users/user/Downloads". Opening $HOME/Downloads and tagging a file gives a different result depending on whether it is tagged with absolute or relative path. (tmsu files
will list them with relative or absolute path, depending on how they were tagged. I assume if tag
used path/link resolution logic like realpath
, tmsu files
would list both paths in the same format.)
This might be a duplicate of #168 (or vice-versa, but there is more discussion there than here).
What I brought up has a really easy fix. In fact I fixed it locally. Let me clean it up and make a PR tomorrow.