Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

renaming file which is a link to same file name doesn't work recursive #11

Open
novoid opened this issue Sep 17, 2021 · 0 comments
Open

Comments

@novoid
Copy link
Owner

novoid commented Sep 17, 2021

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

  1. 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
  1. 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant