Skip to content

Tighten up POSIX file operations#481

Merged
AlCutter merged 5 commits intotransparency-dev:mainfrom
AlCutter:fix_posix
Feb 11, 2025
Merged

Tighten up POSIX file operations#481
AlCutter merged 5 commits intotransparency-dev:mainfrom
AlCutter:fix_posix

Conversation

@AlCutter
Copy link
Collaborator

@AlCutter AlCutter commented Feb 11, 2025

This PR tightens the semantics of the file operations performed by the POSIX storage implementation.

It splits "writing files" across 3 narrower funcs which are then called by the storage driver depending on exactly which behaviour is intended.

@AlCutter AlCutter requested a review from a team as a code owner February 11, 2025 12:56
@AlCutter AlCutter requested a review from patflynn February 11, 2025 12:56
@AlCutter AlCutter force-pushed the fix_posix branch 3 times, most recently from 88dc7fe to 4c2e2b4 Compare February 11, 2025 15:49
@AlCutter AlCutter requested a review from roger2hk February 11, 2025 15:49
@AlCutter AlCutter force-pushed the fix_posix branch 2 times, most recently from e9597f8 to b77cf34 Compare February 11, 2025 16:29
if err := createExclusive(p, d); err != nil {
if errors.Is(err, os.ErrExist) {
if r, err := os.ReadFile(p); err != nil {

Copy link
Contributor

Choose a reason for hiding this comment

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

Is this line intended to be empty?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Oops, no - removed.

Copy link
Contributor

@Hayden-IO Hayden-IO left a comment

Choose a reason for hiding this comment

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

Looks great!

@AlCutter AlCutter merged commit f90de01 into transparency-dev:main Feb 11, 2025
15 checks passed
@AlCutter AlCutter deleted the fix_posix branch February 11, 2025 18:11
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.

3 participants