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

Better default for saving files #1446

Closed
simonharrer opened this issue May 24, 2016 · 9 comments
Closed

Better default for saving files #1446

simonharrer opened this issue May 24, 2016 · 9 comments

Comments

@simonharrer
Copy link
Contributor

If the preferences are reset, and I want to download a file, JabRef suggests that I store it under C:\. I would prefer to use a more sophisticated location, e.g., relative to the current bib file perhaps. As normally, one does not have access rights to save directly on C:\, wwhich can leave to strange behavior.

@Siedlerchr
Copy link
Member

If in a file save/open dialog no folder is given, it points default to the user directory (Eigene Dateien) (at least under windows)
This could be done with #1336

@stefan-kolb
Copy link
Member

@simonharrer For me this exactly behaves like you want it to right now. Can you confirm?

@stefan-kolb stefan-kolb added the status: waiting-for-feedback The submitter or other users need to provide more information about the issue label Dec 7, 2016
@simonharrer
Copy link
Contributor Author

simonharrer commented Dec 8, 2016

Nope. Still broken for

JabRef 3.8-dev--snapshot--2016-12-02--master--326ef9f
windows 10 10.0 amd64
Java 1.8.0_112

@simonharrer simonharrer removed the status: waiting-for-feedback The submitter or other users need to provide more information about the issue label Dec 8, 2016
@simonharrer
Copy link
Contributor Author

@stefan-kolb Maybe just enable the flag that files are stored alongside the bib file by default? This would definitely improve matters.

@Siedlerchr
Copy link
Member

Siedlerchr commented Dec 8, 2016

@stefan-kolb @simonharrer
Okay, I looked into it a bit, it simply checks all possible file Directories from the settings., and would return the first found.
Could you please report what kind of directories are set as default?

https://github.com/JabRef/jabref/blob/master/src/main/java/net/sf/jabref/gui/externalfiles/FindFullTextAction.java#L76

@stefan-kolb
Copy link
Member

See BibDatabaseContext.java getFileDirectory():

  1. metadata user-specific directory
  2. metadata general directory
  3. preferences directory
  4. BIB file directory

@Siedlerchr
Copy link
Member

Yeah, when the settings are resetted one of the dirs is chosen, from first to last. ( I know that code piece)
So it would be nice to see where the "root" dir comes from.

@stefan-kolb
Copy link
Member

I have no idea.

@stefan-kolb
Copy link
Member

stefan-kolb commented Dec 8, 2016

Funny enough, I now get the following error:
image
Ok, when the DB file is not saved yet. Should be also fixed. error is misleading.

tobiasdiez pushed a commit to tobiasdiez/jabref that referenced this issue Dec 10, 2016
* Fix JabRef#1446 Only add non empty paths, add user dir default as last resort

* Fix tests

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

No branches or pull requests

3 participants