Skip to content

Conversation

@jku
Copy link
Member

@jku jku commented Mar 7, 2025

Make sure ngclient creates metadata and artifact directories when needed.

This was not useful when caller needed to populate the metadata dir with the initial root anyway, but now with boostrap argument it becomes a usability improvement.

Fixes #2807

Make sure ngclient creates metadata and artifact directories
when needed.

This was not useful when caller needed to populate the metadata dir with
the initial root anyway, but now with boostrap argument it becomes a
usability improvement.

Signed-off-by: Jussi Kukkonen <[email protected]>
@jku jku requested a review from a team as a code owner March 7, 2025 12:48

if filepath is None:
filepath = self._generate_target_file_path(targetinfo)
Path(filepath).parent.mkdir(exist_ok=True, parents=True)
Copy link
Member Author

Choose a reason for hiding this comment

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

This is a case where Pathlib is much more ergonomic so I'm using it even though we don't use Paths generally

@jku jku mentioned this pull request Mar 7, 2025
Copy link
Contributor

@kairoaraujo kairoaraujo left a comment

Choose a reason for hiding this comment

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

LGTM

@jku jku merged commit 15933a9 into theupdateframework:develop Mar 9, 2025
17 checks passed
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.

ngclient: allow metadata dir to not exist

2 participants