From 799f657bdf01d588c48ccfe22382fa93c4b5df88 Mon Sep 17 00:00:00 2001 From: stefanprobst Date: Sat, 24 Aug 2019 19:22:06 +0200 Subject: [PATCH] =?UTF-8?q?fix(gatsby-source-filesystem):=20Use=20forward?= =?UTF-8?q?=20slashes=20on=20relative=E2=80=A6=20(#17048)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 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) ), }