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

Make sure that an existing path is a directory for create_directories #95

Merged

Conversation

christophebedard
Copy link
Member

@christophebedard christophebedard commented Sep 21, 2020

If the final/complete path already exists, make sure that it is a directory.

I've also added a line in the relevant test.

Fixes #94

Copy link
Member

@wjwwood wjwwood left a comment

Choose a reason for hiding this comment

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

lgtm

@wjwwood
Copy link
Member

wjwwood commented Sep 22, 2020

CI:

  • Linux Build Status
  • Linux-aarch64 Build Status
  • macOS Build Status
  • Windows Build Status

@christophebedard
Copy link
Member Author

I'll look into that Windows failure.

Signed-off-by: Christophe Bedard <bedard.christophe@gmail.com>
@christophebedard
Copy link
Member Author

christophebedard commented Sep 22, 2020

Trying something quickly, but if that doesn't work I'll have to actually try on Windows.

  • Windows Build Status

@christophebedard
Copy link
Member Author

Not exactly sure why, but it looks like that did the trick. We don't really need to check if the path is a directory at every step/recursively, since the next step will just fail if it's not a directory anyway.

I'll let you decide if you want to re-run CI on all platforms.

Copy link
Member

@wjwwood wjwwood left a comment

Choose a reason for hiding this comment

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

lgtm, new CI:

  • Linux Build Status
  • Linux-aarch64 Build Status
  • macOS Build Status
  • Windows Build Status

@wjwwood wjwwood merged commit a54db52 into ros2:master Sep 24, 2020
@christophebedard christophebedard deleted the fs-create-directories-check-if-dir branch September 24, 2020 17:03
wjwwood added a commit that referenced this pull request Sep 24, 2020
wjwwood added a commit that referenced this pull request Sep 25, 2020
fujitatomoya added a commit to fujitatomoya/rcpputils that referenced this pull request Sep 25, 2020
fujitatomoya added a commit to fujitatomoya/rcpputils that referenced this pull request Sep 25, 2020
…eate_directories (ros2#95)" (ros2#96)"

This reverts commit ba5d1e4.

Signed-off-by: Tomoya.Fujita <Tomoya.Fujita@sony.com>
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.

rcpputils::fs::create_directories doesn't check if an existing path is a directory
2 participants