Skip to content

"Get fulltext" finds too many files when using regexp **/[year]_[auth].*\\.[extension] #2701

@sauliusg

Description

@sauliusg

JabRef version JabRef 3.8.2 linux 4.8.0-41-generic amd64 Java 1.8.0_121on Ubuntu 16.04 finds all files that match only the year, not the year_author when the

**/[year]_[auth].*\\.[extension]

search pattern is used.

Steps to reproduce:

  1. mkdir -p ~/tmp/jabref/pdf; cd ~/tmp/jabref

  2. touch pdf/1983_Feringa_509.pdf pdf/1983_Author_123.pdf pdf/1983_unknown.pdf

  3. jabref &

  4. unpack the attached "bibliography.bib" (from the attached "bibliography.zip", contains just one entry) to the working directory;

  5. jabref bibliography.bib

  6. Options|Preferences|File: tick "use regular expression search"; set regexp to:

    **/[year]_[auth].*\.[extension]

or, alternatively, to:

**/[year]_[auth]_[firstpage].*\\.[extension]
  1. Edit the entry; go to "General"; remove the file; click "Get fulltext"
    => JabRef finds all files that start with pdb/1983_*, although one would expect that if finds only pdf/1983_Feringa_509.pdf (the versions up to JabRef 2.10 behaved as expected).

Screenshots are attached.

The bug could be reproduced also in the e10e62f 'master' commit using './gradlew run' and Eclipse (Neon), running the JabRefMain class.

bibliography.zip
screenshot from 2017-04-01 17-34-47
screenshot from 2017-04-01 17-35-09

My file tree configuration:

saulius@koala jabref/ $ pwd
/home/saulius/tmp/jabref
saulius@koala jabref/ $ tree
.
├── bibliography.bib
├── bibliography.bib.sav
├── bibliography.zip
└── pdf
        ├── 1983_Author_123.pdf
        ├── 1983_Feringa_509.pdf
        ├── 1983_unknown.pdf
        └── Feringa1983.pdf

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions