Skip to content

Commit 4f8dab3

Browse files
authored
fix(gatsby-source-filesystem): Support creating file nodes for paths containing folders (#25687)
1 parent 26a9919 commit 4f8dab3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/gatsby-source-filesystem/src/create-file-node-from-buffer.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -74,8 +74,8 @@ async function processBufferNode({
7474
ext = filetype ? `.${filetype.ext}` : `.bin`
7575
}
7676

77-
await fs.ensureDir(path.join(pluginCacheDir, hash))
7877
filename = createFilePath(path.join(pluginCacheDir, hash), name, ext)
78+
await fs.ensureDir(path.dirname(filename))
7979

8080
// Cache the buffer contents
8181
await writeBuffer(filename, buffer)

0 commit comments

Comments
 (0)