Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Initialise POSIX log if uninitialized without flag #480

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

haydentherapper
Copy link

This removes the need to specify an --initialise flag. If the provided storage_dir does not exist or is empty, the log will be initialised with the required .state directory.

If the directory contains files, it is assumed to be properly initialised. I've added a check that the .state directory exists before creating the required version file, in case a directory is reused that has other unrelated files.

Fixes #476

This removes the need to specify an --initialise flag.
If the provided storage_dir does not exist or is empty, the
log will be initialised with the required .state directory.

If the directory contains files, it is assumed to be properly
initialised. I've added a check that the .state directory exists before
creating the required version file, in case a directory is reused that
has other unrelated files.

Fixes transparency-dev#476

Signed-off-by: Hayden Blauzvern <[email protected]>
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.

Idempotent posix.New without explicit initialization
1 participant