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

Wrong User for fileDirectoryLatex #9990

Open
2 tasks done
lcnittl opened this issue Jun 8, 2023 · 4 comments
Open
2 tasks done

Wrong User for fileDirectoryLatex #9990

lcnittl opened this issue Jun 8, 2023 · 4 comments
Assignees
Labels
bib(la)tex bug Confirmed bugs or reports that are very likely to be bugs external files
Milestone

Comments

@lcnittl
Copy link

lcnittl commented Jun 8, 2023

JabRef version

5.9 (latest release)

Operating system

Windows

Details on version and operating system

No response

Checked with the latest development build

  • I made a backup of my libraries before testing the latest development version.
  • 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:

  1. Create bib file

  2. on a HostA with a UserA set fileDirectoryLatex to C:\Path\A (via GUI Library > 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:

image

  1. Move/Copy the file to a HostB

  2. on HostB with a UserB set fileDirectoryLatex to C:\Path\B

    Instead 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 HostB is set to UserA)

    Yet, the GUI shows:

    image

  3. Features like relative paths of Aux File (for TexGroup) 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):

image

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:

image

Appendix

No response

@koppor
Copy link
Member

koppor commented Jun 8, 2023

This refs koppor#572, because there should be a proper hover.

@lcnittl Can you show me, what on HostB is shown in the preferences as default owner?

grafik

@koppor
Copy link
Member

koppor commented Jun 8, 2023

After this is fixed, work should start at #8344

@lcnittl
Copy link
Author

lcnittl commented Jun 8, 2023

@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)

  1. JabRef default owner = UserA

    @Comment{jabref-meta: fileDirectoryLatex-UserA-HostA:C:\\Path\\A;}
    
    @Comment{jabref-meta: fileDirectoryLatex-UserA-HostB:C:\\Path\\B;}
  2. 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

  3. 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:

  1. JabRef stores the "default owner" when writing the bib file, but
  2. the OS username is expected when reading the file

@lcnittl
Copy link
Author

lcnittl commented Jun 13, 2023

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

@koppor koppor self-assigned this Jun 19, 2023
@koppor koppor added this to the 6.0-beta milestone Jul 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bib(la)tex bug Confirmed bugs or reports that are very likely to be bugs external files
Projects
Status: Normal priority
Development

No branches or pull requests

3 participants