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

mountcomposefs: Handle empty basedir option #265

Merged
merged 1 commit into from
Mar 25, 2024

Conversation

eriksjolund
Copy link
Collaborator

Fail with an error message if any of the
basedir option paths is an empty string.

Fail with an error message if any of the
basedir option paths is an empty string.

Signed-off-by: Erik Sjölund <[email protected]>
@eriksjolund eriksjolund force-pushed the handle-empty-basedir-option branch from c8dc5d3 to a96f786 Compare March 25, 2024 06:59
Copy link
Contributor

@cgwalters cgwalters left a comment

Choose a reason for hiding this comment

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

Hmmm...I guess this is OK, but couldn't we get the same effect with less code by just checking if (!*opt_basedir) errx(EXIT_FAILURE, "Invalid empty basedir") ?

@eriksjolund
Copy link
Collaborator Author

An empty string might occur anywhere in the colon-separated list.

@cgwalters

This comment was marked as outdated.

Copy link
Contributor

@cgwalters cgwalters left a comment

Choose a reason for hiding this comment

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

Oh sorry I misread things. Yes, this looks fine.

@cgwalters cgwalters merged commit 1179638 into containers:main Mar 25, 2024
10 checks passed
@eriksjolund eriksjolund deleted the handle-empty-basedir-option branch April 1, 2024 07:16
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