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(gatsby-source-filesystem): Support creating file nodes for paths containing folders #25687

Merged
merged 1 commit into from
Jul 16, 2020

Conversation

jshearer
Copy link
Contributor

Description

I encountered a subtile bug in the logic for handling createFileNodeFromBuffer. My intention is to create file nodes nested inside folders. When I try this currently (without this PR), the containing folder hierarchy is not created, since the call to fs.ensureDir is passed a different directory than writeBuffer. This PR fixes that.

Documentation

The docs for createFileNodeFromBuffer are here.

Related Issues

There are no related issues that I could find.

@jshearer jshearer requested a review from a team as a code owner July 10, 2020 15:54
@gatsbot gatsbot bot added the status: triage needed Issue or pull request that need to be triaged and assigned to a reviewer label Jul 10, 2020
@TylerBarnes TylerBarnes added the topic: source-plugins Relates to the Gatsby source plugins (e.g. -filesystem) label Jul 10, 2020
@TylerBarnes TylerBarnes removed the status: triage needed Issue or pull request that need to be triaged and assigned to a reviewer label Jul 10, 2020
Copy link
Contributor

@pieh pieh left a comment

Choose a reason for hiding this comment

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

Yup, makes sense. Thanks for handling it!

@pieh pieh merged commit 4f8dab3 into gatsbyjs:master Jul 16, 2020
@gatsbot
Copy link

gatsbot bot commented Jul 16, 2020

Holy buckets, @jshearer — we just merged your PR to Gatsby! 💪💜

Gatsby is built by awesome people like you. Let us say “thanks” in two ways:

  1. We’d like to send you some Gatsby swag. As a token of our appreciation, you can go to the Gatsby Swag Store and log in with your GitHub account to get a coupon code good for one free piece of swag. We’ve got Gatsby t-shirts, stickers, hats, scrunchies, and much more. (You can also unlock even more free swag with 5 contributions — wink wink nudge nudge.) See gatsby.dev/swag for details.
  2. We just invited you to join the Gatsby organization on GitHub. This will add you to our team of maintainers. Accept the invite by visiting https://github.com/orgs/gatsbyjs/invitation. By joining the team, you’ll be able to label issues, review pull requests, and merge approved pull requests.

If there’s anything we can do to help, please don’t hesitate to reach out to us: tweet at @gatsbyjs and we’ll come a-runnin’.

Thanks again!

mwfrost pushed a commit to mwfrost/gatsby that referenced this pull request Apr 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic: source-plugins Relates to the Gatsby source plugins (e.g. -filesystem)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants