appendfilename should rename all linked "parent links" as long as the file name is the same. However, this seems to work only for the first link and not for all.
How to reproduce the issue
create two nested TagTrees with https://github.com/novoid/filetags from files/* to tagtrees1/ and then from tagtrees1/tag/* to tagtrees2/ (all within the same parent directory)
this results in a file within tagtrees2/tag/foo -- tag.txt that points to tagtrees1/tag/foo -- tag.txt which points to files/foo -- tag.txt
appendfilename -t "foobar" results in:
tagtrees2/tag/foo foobar -- tag.txt
tagtrees1/tag/foo foobar -- tag.txt
files/foo -- tag.txt <-- here, the renaming/recursion stops which is wrong. It should be: files/foo foobar -- tag.txt
Educated guess how to fix this
Adapt def handle_file_and_symlink_source_if_found(filename, text, dryrun) so that it works recursively just like filetags does with tags.
appendfilename should rename all linked "parent links" as long as the file name is the same. However, this seems to work only for the first link and not for all.
How to reproduce the issue
files/*
totagtrees1/
and then fromtagtrees1/tag/*
totagtrees2/
(all within the same parent directory)tagtrees2/tag/foo -- tag.txt
that points totagtrees1/tag/foo -- tag.txt
which points tofiles/foo -- tag.txt
appendfilename -t "foobar"
results in:tagtrees2/tag/foo foobar -- tag.txt
tagtrees1/tag/foo foobar -- tag.txt
files/foo -- tag.txt
<-- here, the renaming/recursion stops which is wrong. It should be:files/foo foobar -- tag.txt
Educated guess how to fix this
Adapt
def handle_file_and_symlink_source_if_found(filename, text, dryrun)
so that it works recursively just likefiletags
does with tags.