-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Fixes the auto-update problem with TexGroups on Ubuntu Linux and makes the detection of file modifications more reliable #7412
Fixes the auto-update problem with TexGroups on Ubuntu Linux and makes the detection of file modifications more reliable #7412
Conversation
Thanks for your PR. Can you please explain what the problem is/was and why your fix works? It looks like you only have a relative file in your tex group and want to resolve this path relative to the latex folder, is this correct? |
If the problem is that it is a relative path, perhaps this would be another location where the code could be added?
|
Basically, the path for the
creates a Path object Later, the "file-monitor" detects the modified file
no proper entry for this file is found in the keys of the map, thus no listener gets informed. If @k3KAW8Pnf7mkmdSMPHz27 You are right. In this case, when the library is simply opened from within JabRef, your mentioned code line is not executed, but if one would convert an existing group to a tex-group, this should be a problem as well. |
Changing
to
and ignoring the other fixes, should fix both cases (I. simply opening the library and II. changing a group to a |
I am not up-to-date on how changing the group type works in practice, but it seems like a good solution to the relativized path issue. |
Thanks for the explanation! #7412 (comment) looks like the right approach to me. In addition, I would suggest to add a method |
Basically, I agree with @tobiasdiez, same regarding #7173 (comment). |
…a group to a TexGroup
… file creation events for existing files as well as file modifications
I have tested this fix for loading a library, for changing a group to a @k3KAW8Pnf7mkmdSMPHz27 Could you check for safety reasons, that your library on macOS is still getting updated with this version? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
The library is still getting updated 👍 😃 |
Would be nice if someone can test this under Windows as well, because Windows and Linux behave differently regarding file watching events/file system operations |
Just a general thing: Please try to shorten your PR titles and commit messages and keep them meaningful, so after months you still understand, what you did. See https://www.freecodecamp.org/news/writing-good-commit-messages-a-practical-guide/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't have a full Windows 10 setup, but the relative path works when manually editing the .aux file. There is an issue in that TexGroup.create
doesn't throw an exception if the file doesn't exist but it is not related to this PR.
984a779
Fixes #7173 (comment) in #7173.
On Ubuntu Linux the auto-update functionality does not work with
TexGroup
s, when the associated.aux
file gets updated externally.This is a quick fix for this issue, which may still be improved. Only one of both files needs to be changed in order to fix it.