Skip to content

Cleanup temporary directories in model editor#2820

Merged
koesie10 merged 2 commits intomainfrom
koesie10/cleanup-temp-directories
Sep 15, 2023
Merged

Cleanup temporary directories in model editor#2820
koesie10 merged 2 commits intomainfrom
koesie10/cleanup-temp-directories

Conversation

@koesie10
Copy link
Copy Markdown
Member

This cleans up the two temporary directories we create in the model editor:

  • When opening the model editor, a temporary directory with the query files is created. This will clean it up after either the panel or the view is disposed. This is just temporary, the queryDir will be removed once the queries have been moved to github/codeql.
  • When using the automodel functionality, a temporary directory with an extension pack containing the filter is created. This will clean it up after running the query.

Checklist

  • CHANGELOG.md has been updated to incorporate all user visible changes made by this pull request.
  • Issues have been created for any UI or other user-facing changes made by this pull request.
  • [Maintainers only] If this pull request makes user-facing changes that require documentation changes, open a corresponding docs pull request in the github/codeql repo and add the ready-for-doc-review label there.

@koesie10 koesie10 marked this pull request as ready for review September 15, 2023 10:18
@koesie10 koesie10 requested a review from a team as a code owner September 15, 2023 10:18
Copy link
Copy Markdown
Contributor

@robertbrignull robertbrignull left a comment

Choose a reason for hiding this comment

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

Looks good to me.

We could make use of some try { ... } finally { ... } blocks, but I'm not sure it's worth it. As far as I can tell, we're using tmp dirs so they'll be deleted when the computer is restarted.

@koesie10 koesie10 merged commit 8bc8ffe into main Sep 15, 2023
@koesie10 koesie10 deleted the koesie10/cleanup-temp-directories branch September 15, 2023 12:04
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.

2 participants