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

mkdir_with_parents: skip existing directories #1334

Merged
merged 1 commit into from
Jun 30, 2023
Merged

Conversation

mmjconolly
Copy link
Contributor

Previously we relied on mkdir claiming that a (parent) directory already exists.
There are some circumstances where the kernel will report other issues ahead of saying that the directory already exists.
For example, a read-only filesystem error could be reported even when the directory exits.

This PR checks if the directory exists before trying to create it.

Copy link
Contributor

@JakeSiFive JakeSiFive left a comment

Choose a reason for hiding this comment

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

Interesting, I hadn't ever thought about that.

@mmjconolly mmjconolly merged commit 2c66bb1 into master Jun 30, 2023
@mmjconolly mmjconolly deleted the create-dir branch June 30, 2023 21:21
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