Skip to content

Add CleanupJob for removing non-existent files #10929

@koppor

Description

@koppor

(This is #7288 (comment))

As user, I have renamed files, but JabRef still has the old links. JabRef perfectly links the new files, but also keeps the broken links. I want to have them removed.

Implement org.jabref.logic.cleanup.RemoveLinksToNotExistentFiles.

That class is similar to org.jabref.logic.cleanup.MoveFilesCleanup, but uses org.jabref.logic.externalfiles.LinkedFileHandler#findExistingFile. Links with org.jabref.model.entry.LinkedFile#isOnlineLink() do not exist in the file system, but have to kept, too.


When testing, please make use of JUnit's @TempDir or let inspire yourself with org.jabref.logic.search.DatabaseSearcherWithBibFilesTest.

Metadata

Metadata

Assignees

Type

No type
No fields configured for issues without a type.

Projects

Status
Done
Status
Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions