Skip to content

Create parent directories of nested SourceFile #339

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

Merged
merged 2 commits into from
Mar 5, 2023

Conversation

pranjalvachaspati-toast
Copy link
Contributor

Currently, createNewFile() fails if you have a SourceFile in a directory, since it can't create the owning directory.

Calling mkdirs() on the parent directory fixes this, and has no effect if the path already exists.

Currently, createNewFile() fails if you have a SourceFile in a directory,
since it can't create the owning directory.
@pranjalvachaspati-toast
Copy link
Contributor Author

This fixes Issue #340.

@pranjalvachaspati-toast
Copy link
Contributor Author

@tschuchortdev please let me know if this PR needs anything!

@jisungbin
Copy link

Hi @tschuchortdev, I need this feature. Can you review this PR?

@tschuchortdev tschuchortdev enabled auto-merge (rebase) March 5, 2023 23:16
@tschuchortdev tschuchortdev disabled auto-merge March 5, 2023 23:27
@tschuchortdev tschuchortdev merged commit 3407b15 into tschuchortdev:master Mar 5, 2023
@tschuchortdev
Copy link
Owner

Thanks for this PR! I'm sorry I didn't get to it sooner. Your work is appreciated and will be in the next release, which I'm about to start.

ianlevesque pushed a commit to facebookincubator/kotlin-compile-testing that referenced this pull request Mar 6, 2023
Currently, createNewFile() fails if you have a SourceFile in a directory,
since it can't create the owning directory.
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