From d493776a10d5b5dae93d59834d164273a00d6502 Mon Sep 17 00:00:00 2001 From: Stefan Probst Date: Sat, 24 Aug 2019 11:48:34 +0200 Subject: [PATCH] fix(gatsby-source-filesystem): Use forward slashed on relativeDirectory --- packages/gatsby-source-filesystem/src/create-file-node.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/packages/gatsby-source-filesystem/src/create-file-node.js b/packages/gatsby-source-filesystem/src/create-file-node.js index 1a696ddad1a73..d9eeef8f9cca3 100644 --- a/packages/gatsby-source-filesystem/src/create-file-node.js +++ b/packages/gatsby-source-filesystem/src/create-file-node.js @@ -18,9 +18,8 @@ exports.createFileNode = async ( ...parsedSlashed, absolutePath: slashed, // Useful for limiting graphql query with certain parent directory - relativeDirectory: path.relative( - pluginOptions.path || process.cwd(), - parsedSlashed.dir + relativeDirectory: slash( + path.relative(pluginOptions.path || process.cwd(), parsedSlashed.dir) ), }