Skip to content

cleanup temporary files, use prefix "jabref-"#7811

Merged
calixtus merged 1 commit into
JabRef:mainfrom
antalk2:cleanup-temp-files
Jun 10, 2021
Merged

cleanup temporary files, use prefix "jabref-"#7811
calixtus merged 1 commit into
JabRef:mainfrom
antalk2:cleanup-temp-files

Conversation

@antalk2

@antalk2 antalk2 commented Jun 10, 2021

Copy link
Copy Markdown
Contributor

Problem

  • The two changed locations create temporary files, but do not arrange to clean them up.
  • The tests create sevaral copies of journalList.mv, tends to fill up /tmp

Now:

  • these files and directoriees are removed on normal exit
  • they are prefixed with "jabref-" to
    • (1) let the user know who to complain
      and which program should not run while removing
    • (2) make it easier to remove them after abnormal exit
  • Change in CHANGELOG.md described in a way that is understandable for the average user (if applicable)
    NA

  • Tests created for changes (if applicable)
    NA

  • [X ] Manually tested changed features in running JabRef (always required)

    • also with gradlew test
  • Screenshots added in PR description (for UI changes)
    NA

  • Checked documentation: Is the information available and up to date? If not created an issue at https://github.com/JabRef/user-documentation/issues or, even better, submitted a pull request to the documentation repository.
    NA

// Take everything after the last '/' as name + extension
String fileNameWithExtension = sourcePath.substring(sourcePath.lastIndexOf('/') + 1);
String fileName = FileUtil.getBaseName(fileNameWithExtension);
String fileName = "jabref-" + FileUtil.getBaseName(fileNameWithExtension);

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I had to think long about this. Since its a temporary file anyway, the filename doesn't matter. Thus, good to go!

@calixtus calixtus merged commit 0191910 into JabRef:main Jun 10, 2021
@antalk2 antalk2 deleted the cleanup-temp-files branch June 10, 2021 21:17
Siedlerchr added a commit to JabRef/jabref-koppor that referenced this pull request Jun 16, 2021
* upstream/main:
  Added auto-key-generation task to task-progress (JabRef#7797)
  cleanup temporary files, use prefix "jabref-" (JabRef#7811)
  Add easier how-to for checklist (JabRef#7813)
  Fix annotation + package of ACMPortalParserTest (JabRef#7812)
  Implemented a select all button for the library import function (issue JabRef#7786) (JabRef#7808)
  Fix for issue 4682 : Restructuring the side pane structure having additional functionality and merging the remove group menus (JabRef#7714)
@btut btut self-assigned this Jun 23, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants