-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Removed Globals from BibDatabaseContext #1856
Removed Globals from BibDatabaseContext #1856
Conversation
e2c7de6
to
a480dee
Compare
.ifPresent(files::add)); | ||
entry.getFieldOptional(FieldName.PDF) | ||
.ifPresent( | ||
pdf -> FileUtil |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The formatting here and below looks a bit weird...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One of them was sorted out with the new code, but not the other...
I think I know how to get around this now. It seems like there are three possible directories "fileDirectory", "pdfDirectory", and "psDirectory", where only the first one is normally used and the other comes from the legacy pdf and ps fields. Now, it might be possible to hard-code in the preferences support for more extensions, but do we really need to support that or would it be OK to include a limitation to only those three? |
LGTM, jut two weird formatting things. Regarding the directories, there is also a discussion about the import/export dir preferences #1813 |
There was an old issue where someone used them for something completely different, so maybe we shouldn't remove them. As long as it is only those three (or at least a well known subset of all possible |
#496 I think. Although that doesn't discuss arbitrary extensions (from a quick browse). |
I would also say that it is ok to remove support for the legacy file directories. And I do not really see why we should support arbitrary extension directories. |
OK, dropping arbitrary extensions I'm fine with, but I will not remove support for the pdf and ps directories right now. |
a480dee
to
9d7b26e
Compare
9d7b26e
to
b821a4e
Compare
Now there are no more dependencies on Globals or logic in BibDatabaseContext. Still a dependency on shared though, but that I haven't looked into. |
* Removed Globals from BibDatabaseContext * Removed the temporarily introduced Globals dependency in logic
This almost worked. The penalty was that I had to (temporarily) introduce it in
FileUtil.expandFilename
where the arbitrary extension line makes it extremely cumbersome to get around it.