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

automatically added file link has absolute instead of relative path #3476

Closed
sbitzer opened this issue Dec 1, 2017 · 6 comments
Closed

automatically added file link has absolute instead of relative path #3476

sbitzer opened this issue Dec 1, 2017 · 6 comments

Comments

@sbitzer
Copy link

@sbitzer sbitzer commented Dec 1, 2017

JabRef 4.1-dev--snapshot--2017-11-30--master--d45d7ca38
Linux 3.16.0-38-generic amd64
Java 1.8.0_151
on Mint 17 (Ubuntu 14.04)

Steps to reproduce:

  1. import new entry
  2. add file with bibtex key into file directory
  3. open new entry in entry editor

I just switched from v4.0 to the latest development version, because Medline import did not work in v4.0 anymore. Unfortunately, now files appear to be added with absolute paths to the library. E.g., I added entry Lake2016 and Jabref now automatically adds the corresponding file as /home/bitzer/papers/Lake2016.pdf instead of as Lake2016.pdf as before. So I have to manually edit the file link to get the relative path. Is that intended behaviour and how do I get Jabref to automatically add relative links again?

@Siedlerchr
Copy link
Contributor

@Siedlerchr Siedlerchr commented Dec 3, 2017

Hi,
relative links are created automatically. And this depends on your settings, there are 4 settings for files:

  1. Checkbox: Use bibfile as main file location -> Overwrites all other settings
  2. Main file directory. globally in JabRef, valid for all files
  3. Use and Library setting in the properties of the bib file: Here you can also enter relative path.
    So depending on your settings, JabRef will relatvize all paths against the first found file directory.
@sbitzer
Copy link
Author

@sbitzer sbitzer commented Dec 4, 2017

Hi,

all of these 3 were set in Jabref 4.0 and are still set in the development version I'm using now (1. checked, 2. set to /home/bitzer/papers and 3. set to /home/bitzer/papers, too). Still, version 4.0 added relative paths while the development version adds absolute paths.

@Siedlerchr
Copy link
Contributor

@Siedlerchr Siedlerchr commented Dec 16, 2017

Is the location of the bibfile the same as /home/bitzer/papers? If not then uncheck the combobox

@sbitzer
Copy link
Author

@sbitzer sbitzer commented Dec 19, 2017

Yes, the bibfile is in /home/bitzer/papers itself. Also the issue persists in the newest version JabRef-4.1-dev--snapshot--2017-12-08--master--6f39151a7.jar

@Siedlerchr
Copy link
Contributor

@Siedlerchr Siedlerchr commented Dec 19, 2017

Ah I now can reproduce your behavior. It is the auto link which adds it as absolute path. If you manually select the file, it is correct. I will be working on a fix for this

@sbitzer
Copy link
Author

@sbitzer sbitzer commented Dec 19, 2017

Cool, thank you!

Siedlerchr added a commit that referenced this issue Dec 19, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.