Skip to content

fix(gatsby-source-filesystem): Support creating file nodes for paths containing folders - #25687

Merged
pieh merged 1 commit into
gatsbyjs:masterfrom
jshearer:fix/gatsby-source-filesystem-paths
Jul 16, 2020
Merged

fix(gatsby-source-filesystem): Support creating file nodes for paths containing folders#25687
pieh merged 1 commit into
gatsbyjs:masterfrom
jshearer:fix/gatsby-source-filesystem-paths

Conversation

@jshearer

Copy link
Copy Markdown
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 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

@pieh pieh left a comment

Copy link
Copy Markdown
Contributor

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

gatsbot Bot commented Jul 16, 2020

Copy link
Copy Markdown

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
raffishquartan pushed a commit to raffishquartan/gatsby that referenced this pull request Apr 28, 2026
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