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

Filepath saved on Windows does not open on Linux #3311

Closed
JoKalliauer opened this issue Oct 16, 2017 · 7 comments
Closed

Filepath saved on Windows does not open on Linux #3311

JoKalliauer opened this issue Oct 16, 2017 · 7 comments
Assignees

Comments

@JoKalliauer
Copy link
Contributor

JoKalliauer commented Oct 16, 2017

JabRef 4.0
Linux 4.10.0-37-generic amd64 
Java 1.8.0_144

Steps to reproduce:

  1. create an idential folderstructure on Windows and on Linux (f.e. use sync-systems like: dropbox, onedrive, googledrive, owncloud)
  2. JabRef on Windows&Linux must have the same "Main file directory" (f.e. Linux: /home/jkalliau/ownCloud and Windows: C:/Users/jkalliau/ownCloud)
  3. add a PDF-File to an article in JabRef to a bibtex-file on Windows
  4. try to open this PDF-File in JabRef on Linux

The problem is that Windows saves:

File = {:..\\..\\Literature\\DNA\\Weitere\\Bai_Martin_Scheres_Dietz_2012_PNAS.pdf:PDF},
file = {:PhDJK\\Literature\\MD\\Amber17.pdf:PDF},

But Linux saves as:

file = {:PhDJK/Literature/MD/Amber17.pdf:PDF},

With JabRef 3.8.2 neither Windows nor Linux had problems using different File-Structures, but now with JabRef 4 on Linux it does (JabRef can't find the file). :-(

On Windows with JabRef4.0 it still works also with Linux-Filepathes.

This bib-file has developed over some time with JabRef 3.x and it always worked to open with JabRef 3.8.2 on Windows and on Linux, also both added file-paths in a different form.

I would stay with JabRef 3.8.2, but due to bug #2879 I prefer JabRef 4.

Otherwise I might have to use sed to correct the path-mistakes.

bib-file with filepath saved on Windows ``` % Encoding: UTF-8

@Article{bai2012cryo,
Title = {{Cryo-EM} structure of a {3D} {DNA-origami} object},
Author = {Bai, Xiao-chen and Martin, ThomasG and Scheres, SjorsHW and Dietz, Hendrik},
Journal = {Proceedings of the National Academy of Sciences},
Year = {2012},

Month = dec,
Number = {49},
Pages = {20012--20017},
Volume = {109},

Adsnote = {Provided by the SAO/NASA Astrophysics Data System},
Adsurl = {http://adsabs.harvard.edu/abs/2012PNAS..10920012B },
Doi = {10.1073/pnas.1215713109},
File = {:..\..\Literature\DNA\Weitere\Bai_Martin_Scheres_Dietz_2012_PNAS.pdf:PDF},
Groups = {DNA},
Keywords = {rank2},
Publisher = {National Acad Sciences}
}

@Article{case2017amber,
author = {Case, David A and Walker, Ross C and Cheatham III, Thomas E and Simmerling, Carlos LI and Roitberg, Adrian and Merz, Kenneth M and Luo, Ray and Darden, Tom A and Wang, Junmei and Duke, Robert E and Daniel R. Roe and Scott LeGrand and Jason Swails and Andreas W. Götz and David Cerutti and Tyler Luchko and Gérald Monard and Celeste Sagui and Feng Pan and Charles Lin and Daniel Mermelstein and Pengfei Li and Alexey Onufriev and Saeed Izadi and Romain M. Wolf and Xiongwu Wu and Holger Gohlke and Nadine Homeyer and Ruxi Qi and Wesley M. Botello-Smith and Li Xiao and D’Artagnan Greene and Tim Giese and Taisung Lee and Darrin York and Jian Liu and Hai Nguyen and Igor Omelyan and Andriy Kovalenko and Peter A. Kollman and Zhang, W and others},
title = {Amber 2017 Reference Manual (Covers Amber16 and AmberTools17)},
journal = {University of California, San Francisco},
year = {2017},
month = may,
day = {29},
file = {:PhDJK\Literature\MD\Amber17.pdf:PDF},
url = {http://ambermd.org/doc12/Amber17.pdf},
}

@comment{jabref-meta: databaseType:bibtex;}

@comment{jabref-meta: grouping:
0 AllEntriesGroup:;
1 StaticGroup:DNA;0;1;;;;;
}

</details>
@lenhard
Copy link
Member

lenhard commented Oct 17, 2017

@Siedlerchr You have recently modified the file path serialization, right? Can you comment on this?

@Siedlerchr
Copy link
Member

Siedlerchr commented Oct 17, 2017 via email

@lenhard
Copy link
Member

lenhard commented Nov 17, 2017

@JoKalliauer We think we have a fix for this. Can you please try out the version that includes the fix, which is available here: http://builds.jabref.org/linuxlink/ and let us know if it works for you.

@lenhard lenhard added the status: waiting-for-feedback The submitter or other users need to provide more information about the issue label Nov 17, 2017
@JoKalliauer
Copy link
Contributor Author

JabRef 4.1-dev--snapshot--2017-11-04--linuxlink--4ffdabf5c
Linux 4.10.0-38-generic amd64 
Java 1.8.0_151
JabRef 4.1-dev--snapshot--2017-11-04--linuxlink--4ffdabf5c
Windows 7 6.1 amd64 
Java 1.8.0_152

Thanks now JabRef4.1LinuxLink on Windows adds forward slashes, but the file-references from my JabRef3.8-Win.bib file can still not be opened on JabRef4.1LinuxLink on Linux, therefore I had to use the terminal-command to change the old JabRef-file:

sed -ri 's/  (f|F)ile[ ]+= \{:([-[:alnum:] _.\/\;\:]+)\\\\([-[:alnum:] _.\\\/\;\:\(\)]+).([[:alpha:]]{3}):(MHT|PDF|Text|JPG-Bild|Word)\},/  \1ile = \{:\2\/\3.\4:\5\},/' filename.bib

Therefore old JabRef3.8-files are not update-able to JabRef4.1. (only by hand or the command above)

In linuxlink seems some translation missing (see Error-Log below).

Error-Log
Warning: no message translation for "Show console output (only necessary when the launcher is used)" for locale de
Opening: /home/jkalliau/ownCloud/Master/BP2/literature.bib
Opening: /home/jkalliau/ownCloud/Master/jk/JK2EuroC/a4sample.bib
Opening: /home/jkalliau/ownCloud/PhDJK/LaTeX/Style/LiteratureJK.bib
Warning: no message translation for "JabRef cannot access the file because it is being used by another process." for locale de
Warning: no message translation for "JabRef cannot access the file because it is being used by another process." for locale de
Warning: no message translation for "JabRef cannot access the file because it is being used by another process." for locale de
Warning: no message translation for "JabRef cannot access the file because it is being used by another process." for locale de
Warning: no message translation for "JabRef cannot access the file because it is being used by another process." for locale de
Warning: no message translation for "JabRef cannot access the file because it is being used by another process." for locale de

@Siedlerchr
Copy link
Member

Thanks for your feedback!
You could run a cleanup operation to rename the files, that should then set the files links correctly.

Regarding the translations:
They will usually be added before the next release, (at least the German, to avoid double work during dev).
The changes are now in the master. So you can switch to that to stay on top with actual changes

@JoKalliauer
Copy link
Contributor Author

@lenhard: Please remove the waiting-for-feedback-label, or is there feedback missing?

@lenhard lenhard removed the status: waiting-for-feedback The submitter or other users need to provide more information about the issue label Feb 4, 2018
@lenhard
Copy link
Member

lenhard commented Feb 4, 2018

@JoKalliauer Nope, I've removed the label.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants