-
-
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
Find Unlinked files should ignore Thumbs.db, etc #8800
Conversation
src/main/java/org/jabref/gui/externalfiles/FileFilterUtils.java
Outdated
Show resolved
Hide resolved
Thank you for your suggestions. I will make the changes and commit it soon. |
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.
Great work. Some minor remarks, but looks already very good!
src/main/java/org/jabref/gui/externalfiles/UnlinkedFilesDialog.fxml
Outdated
Show resolved
Hide resolved
DEFAULT(Localization.lang("Default")), | ||
INCLUDE_ALL(Localization.lang("Include All Files")); | ||
|
||
private static FileIgnoreUnlinkedFiles instance; |
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.
Is this necessary? You already have a var in FileFilterUtils...
src/main/java/org/jabref/gui/externalfiles/FileIgnoreUnlinkedFiles.java
Outdated
Show resolved
Hide resolved
…abref into unlinkedFiles#373
Co-authored-by: Christoph <[email protected]>
@calixtus Thank you for the review. We are just finishing on the testing of the changes. We will let you know when it's done. |
src/main/java/org/jabref/gui/externalfiles/FileFilterUtils.java
Outdated
Show resolved
Hide resolved
Check for existing files before reading
@Siedlerchr Thank you for your help. Really appreciate the refactoring to improve the code, helped us in understanding the code better. One small thing, you changed the code to read the .gitignore file from the system of the user which i don't think is appropriate in our case. I'm changing it back to read it from the source directory of Jabref. Do let us know your opinion on this. |
Yeah, that's one thing I wasn't sure about. I thought it makes sense to check the folder you selected to search for the files and the subfolders if there is any gitignore file inside and use this then? |
Yeah, i'm not really sure what to do now. Which scenario are we going to take: Searching for the .gitignore file in the directory selected by the user or picking up the .gitignore file from the source directory of JabRef. We initially thought that it makes sense to ignore the extensions and file names mentioned in the .gitignore file of JabRef as it gives a consistent behaviour across all users but I'm quite confused right now and would really appreciate a solution to this. |
Let's ask @koppor as it was his issue... |
import java.io.BufferedReader; | ||
import java.io.File; | ||
import java.io.IOException; | ||
import java.nio.file.DirectoryStream.Filter; | ||
import java.nio.file.Files; | ||
import java.nio.file.Path; |
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.
I just mentioned you are mixing pre-java7-io api and nio. Is there a special reason?
Yes, do this. In addition following files / directories are always ignored:
This list is hard-coded in Java. No additional text file. No option for configuration. |
Understood. Thank you @koppor for the clarification. I'll make the changes accordingly. |
Please also include .DS_Store (A kind of desktop.ini equivalent for mac) in the default ignored files |
Any update here? |
Hi @calixtus, i am recovering from a medical condition right now. Will complete the changes when i'm recovered. Thank you for understanding. |
Of course, get well soon. |
Co-authored-by: Christoph <[email protected]> Co-authored-by: Carl Christian Snethlage <50491877 Co-authored-by: ThiloteE <[email protected]>
@prashant1712 In each dev call, we choose a PR (more or less randomly) to finish it. Today, we worked 2 hours on this one. the intermediate result is there. However, the tests still fail. We need to continue here. |
* upstream/main: Try to make reproducible builds (JabRef#8925) Link to new board (and refine text) Pass the data as a string (JabRef#8923) Add IntelliJ plugins to Gitpod configuration Add gradle support Fix extension name Remove obsolete closing bracket Add gitpod config (JabRef#8921) Fix javafx version not displayed in About Dialog (JabRef#8918) Redesign "Manage field names & content" dialog (JabRef#8892) Rework IACR fetcher (JabRef#8904) Bump h2-mvstore from 2.1.212 to 2.1.214 in /buildSrc (JabRef#8915) Bump unoloader from 7.3.3 to 7.3.4 (JabRef#8912) Bump libreoffice from 7.3.3 to 7.3.4 (JabRef#8913) Bump tika-core from 2.4.0 to 2.4.1 (JabRef#8914) Bump org.eclipse.jgit from 6.1.0.202203080745-r to 6.2.0.202206071550-r (JabRef#8916)
add some more tests Fix checsktyle
* upstream/main: Fix for Dark theme not readable (JabRef#8929) Find Unlinked files should ignore Thumbs.db, etc (JabRef#8800) Try to make reproducible builds (JabRef#8925) Link to new board (and refine text) Pass the data as a string (JabRef#8923) Add IntelliJ plugins to Gitpod configuration Add gradle support Fix extension name Remove obsolete closing bracket Add gitpod config (JabRef#8921) Fix javafx version not displayed in About Dialog (JabRef#8918) Redesign "Manage field names & content" dialog (JabRef#8892)
* upstream/main: fix merge conflict Squashed 'buildres/csl/csl-locales/' changes from 969d9567ac..55459cd79f Squashed 'buildres/csl/csl-styles/' changes from e740261..3d3573c Show pdf icon for mime type in maintable (#8935) Fix for Dark theme not readable (#8929) Find Unlinked files should ignore Thumbs.db, etc (#8800) Try to make reproducible builds (#8925) Link to new board (and refine text) Pass the data as a string (#8923) Add IntelliJ plugins to Gitpod configuration Add gradle support Fix extension name Remove obsolete closing bracket
* upstream/main: Disable ResearchGateTest on CI (JabRef#8955) Bump checkstyle from 10.1 to 10.3.1 (JabRef#8950) Bump checkstyle from 10.1 to 10.3.1 (JabRef#8950) Bump mariadb-java-client from 2.7.5 to 2.7.6 (JabRef#8953) Add notification when adding previous entries to new group configuration (JabRef#8919) Remember Sidepane width after restart (JabRef#8936) move "Warn about duplicates on import" preferences option (JabRef#8937) Fix theme switching exception (JabRef#8939) fix merge conflict Squashed 'buildres/csl/csl-locales/' changes from 969d9567ac..55459cd79f Squashed 'buildres/csl/csl-styles/' changes from e740261..3d3573c Show pdf icon for mime type in maintable (JabRef#8935) Fix for Dark theme not readable (JabRef#8929) Find Unlinked files should ignore Thumbs.db, etc (JabRef#8800) Try to make reproducible builds (JabRef#8925) Link to new board (and refine text)
Fixes koppor#373.
Reads the .gitignore file in the root directory of the library path and obeys it according to the option selected in the UI dialog box.
CHANGELOG.md
described in a way that is understandable for the average user (if applicable)