-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Fix directory path validation checks #13029
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
Conversation
jabgui/src/main/java/org/jabref/gui/libraryproperties/general/GeneralPropertiesViewModel.java
Outdated
Show resolved
Hide resolved
jabgui/src/main/java/org/jabref/gui/libraryproperties/general/GeneralPropertiesViewModel.java
Outdated
Show resolved
Hide resolved
jabgui/src/main/java/org/jabref/gui/libraryproperties/general/GeneralPropertiesViewModel.java
Outdated
Show resolved
Hide resolved
jabgui/src/main/java/org/jabref/gui/libraryproperties/general/GeneralPropertiesViewModel.java
Outdated
Show resolved
Hide resolved
jabgui/src/main/java/org/jabref/gui/libraryproperties/general/GeneralPropertiesViewModel.java
Outdated
Show resolved
Hide resolved
jabgui/src/main/java/org/jabref/gui/libraryproperties/general/GeneralPropertiesViewModel.java
Outdated
Show resolved
Hide resolved
jabgui/src/main/java/org/jabref/gui/libraryproperties/general/GeneralPropertiesViewModel.java
Outdated
Show resolved
Hide resolved
jabgui/src/main/java/org/jabref/gui/libraryproperties/general/GeneralPropertiesViewModel.java
Show resolved
Hide resolved
jabgui/src/main/java/org/jabref/gui/libraryproperties/general/GeneralPropertiesViewModel.java
Show resolved
Hide resolved
Oh, this is unfortunate. I think, I commented. But I have no time to search. If libPath is empty, use configDir. No need for an error message. Only making the configDir path relative to the bib path won't work. Maybe, we need a UML state chart to visualize. I remember, I commented somehow about the global setting to store PDFs relative to the bib file, but I don't know if in the context of this. Shall I add it to current PR (msg like 'Save the library to perform this action') since few lines of code ? or need new PR if we want to disable the field with dir icon since lib not saved. Both is wrong IMHO. Absolute paths always work. |
jabgui/src/main/java/org/jabref/gui/libraryproperties/general/GeneralPropertiesViewModel.java
Outdated
Show resolved
Hide resolved
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.
Small typos in the code.
Need to try out later.
jabgui/src/main/java/org/jabref/gui/libraryproperties/general/GeneralPropertiesViewModel.java
Outdated
Show resolved
Hide resolved
jabgui/src/main/java/org/jabref/gui/libraryproperties/general/GeneralPropertiesViewModel.java
Outdated
Show resolved
Hide resolved
jabgui/src/main/java/org/jabref/gui/libraryproperties/general/GeneralPropertiesViewModel.java
Outdated
Show resolved
Hide resolved
Tried it out - works. |
@trag-bot didn't find any issues in the code! ✅✨ |
1 similar comment
@trag-bot didn't find any issues in the code! ✅✨ |
* upstream/main: Fix directory path validation checks (#13029) Keep merge=union for JabRef_en.properties Merging Entry Creation Buttons Into a Single Tool (#13020) refine-jabsrv (#13044) Switch if branches for readbility (#13042) Updating the gradle wrapper does not need any JDK (#13037) Fix path - and fix typo (#13038)
Closes #13017
Follow-up to #12867
1.
validateDirectory()
method was not handling relative path correctly.2. While assigning 'valid relative path' then pressing folder icon,
getBrowseDirectory()
method was not checking the 'valid provided directory path' properly.Fix: paths now will be resolve against library working directory.
Mandatory checks
CHANGELOG.md
described in a way that is understandable for the average user (if change is visible to the user)