-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Description
JabRef version
5.15 (latest release)
Operating system
GNU / Linux
Details on version and operating system
KDE Neon - based on Ubuntu 24.04
Checked with the latest development build (copy version output from About dialog)
- 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
Look at
jabref/src/main/java/org/jabref/logic/util/io/FileUtil.java
Lines 261 to 263 in af362ea
if (file.startsWith(directory)) { | |
return directory.relativize(file); | |
} |
Appendix
The effect of this is (among other things?) that when manually linking a PDF file to a bib entry, which is located in the main file directory, it can still end up being added by its full path.
This is because the configured main file directory and/or the path to the selected PDF file can contain symbolic links which make the paths appear different (which causes FileUtils::relativize
to fail) even though they are not.
It seems that Path::toRealPath
from Java's standard library could be used for obtaining a canonical path representation that has symlinks resolved.
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
Status