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

fix: create directory if path is passed #1869

Conversation

WolffRuoff
Copy link

Description

This PR fixes issue #1787 by checking in Fs::write_file if a directory was passed. If so, it calls create_dir_all to add any missing directories.

Questions

  • While working on this issue, I noticed that this statement is repeated twice. I'm not sure if this is intentional, but if not I can remove the duplicate one in this PR as well.
  • In the contributing guidelines, I see that it recommends creating tests to verify the fix, but I don't see any tests for this file. Is it ok if I write the tests directly in the file consistent to how url.rs does?

@WolffRuoff WolffRuoff marked this pull request as ready for review March 15, 2024 17:32
@WolffRuoff WolffRuoff requested a review from abernix as a code owner March 15, 2024 17:32
@WolffRuoff WolffRuoff changed the title wip: fix: create directory if path is passed fix: create directory if path is passed Mar 15, 2024
@abernix abernix removed their request for review April 19, 2024 11:03
@jonathanrainer
Copy link
Contributor

Hi @WolffRuoff thanks so much for this PR, we've just merged #1944 which I think solves this one? If that's the case are you ok for me to close this PR now?

@WolffRuoff
Copy link
Author

Hi @jonathanrainer, sounds good 😄

@WolffRuoff WolffRuoff closed this Sep 3, 2024
@WolffRuoff WolffRuoff deleted the fix/create-intermediary-directories branch September 3, 2024 15:48
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