jabref
jabref copied to clipboard
Wrong User for fileDirectoryLatex
JabRef version
5.9 (latest release)
Operating system
Windows
Details on version and operating system
No response
Checked with the latest development build
- [X] I made a backup of my libraries before testing the latest development version.
- [X] I have tested the latest development version and the problem persists
Steps to reproduce the behaviour
JabRef locks onto the first user encounter in fileDirectoryLatex.
To reproduce:
-
Create bib file
-
on a
HostAwith aUserAsetfileDirectoryLatextoC:\Path\A(via GUILibrary>Library properties>LaTeX file directory)This will create the following comment:
@Comment{jabref-meta: fileDirectoryLatex-UserA-HostA:C:\\Path\\A;}
and shows in the GUI as:
-
Move/Copy the file to a
HostB -
on
HostBwith aUserBsetfileDirectoryLatextoC:\Path\BInstead of the anticipated comments:
@Comment{jabref-meta: fileDirectoryLatex-UserA-HostA:C:\\Path\\A;} @Comment{jabref-meta: fileDirectoryLatex-UserB-HostB:C:\\Path\\B;}the file will now contains:
@Comment{jabref-meta: fileDirectoryLatex-UserA-HostA:C:\\Path\\A;} @Comment{jabref-meta: fileDirectoryLatex-UserA-HostB:C:\\Path\\B;}(note the user on
HostBis set toUserA)Yet, the GUI shows:
-
Features like relative paths of
Aux File(forTexGroup) do not work.
Temporary "fix" in the bib file:
The user can be manually corrected in the bib file (with a text editor):
@Comment{jabref-meta: fileDirectoryLatex-UserA-HostA:C:\\Path\\A;}
@Comment{jabref-meta: fileDirectoryLatex-UserB-HostB:C:\\Path\\B;}
Now, the TexGroup relative paths for Aux File works.
Problems encountered with this "fix":
However, the GUI shows an empty LaTeX file directory (Library > Library properties):
When adding C:\Path\B on HostB back via GUI, the bib file contains:
@Comment{jabref-meta: fileDirectoryLatex-UserA-HostA:C:\\Path\\A;}
@Comment{jabref-meta: fileDirectoryLatex-UserA-HostB:C:\\Path\\B;}
@Comment{jabref-meta: fileDirectoryLatex-UserB-HostB:C:\\Path\\B;}
(note the additional entry for HostB, again with the wrong user UserA)
The GUI would now show the field filled:
Appendix
No response
This refs https://github.com/koppor/jabref/issues/572, because there should be a proper hover.
@lcnittl Can you show me, what on HostB is shown in the preferences as default owner?
After this is fixed, work should start at https://github.com/JabRef/jabref/issues/8344
@koppor Nice hint -- indeed the default owner on HostB was set to UserA (i.e. the OS username on HostA).
Some more testing, always starting from:
@Comment{jabref-meta: fileDirectoryLatex-UserA-HostA:C:\\Path\\A;}
(where JabRef default owner = OS username = UserA)
Actions performed on HostB: (OS username = UserB)
-
JabRef default owner =
UserA@Comment{jabref-meta: fileDirectoryLatex-UserA-HostA:C:\\Path\\A;} @Comment{jabref-meta: fileDirectoryLatex-UserA-HostB:C:\\Path\\B;} -
JabRef default owner =
UserB(= OS username )@Comment{jabref-meta: fileDirectoryLatex-UserA-HostA:C:\\Path\\A;} @Comment{jabref-meta: fileDirectoryLatex-UserB-HostB:C:\\Path\\B;}β this matches the desired config
-
JabRef default owner =
UserOther@Comment{jabref-meta: fileDirectoryLatex-UserA-HostA:C:\\Path\\A;} @Comment{jabref-meta: fileDirectoryLatex-UserOther-HostB:C:\\Path\\B;}
So there seems to be a mix-up between OS username and JabRef default owner:
- JabRef stores the "default owner" when writing the bib file, but
- the OS username is expected when reading the file
Probably related: The fileDirectory property is also affected by this, although it uses "JabRef default owner" for both storing and reading (and completely ignores OS user).
@jetbrains-junie Fix the issue
Hey, itβs Junie by JetBrains! I started processing your request π
β Generation Status
- Code generation was successful
Message:
The issue with JabRef using the wrong user for
fileDirectoryLatexwhen moving files was fixed by modifyingMetaDataParser.javato check the current user-host against the extracted user-host. Changes to theMetaDataclass ensured accurate retrieval of LaTeX file directories. The fix was tested and confirmed to maintain existing functionality before submission.
π Issues Detected During Processing
- Some issues occurred that may have limited the context available during generation.
- These did not prevent the operation, but fixing them could improve the results.
Message:
β I tried to build the project before getting started, but it didnβt work.
There might be issues with the environment or the code itself. Please check build log for more details.
More information:
@lcnittl Please test out the latest development version (remember to make a backup of your bib file)