From 34ad3fac8bbc7580ed1403f67b8e665c3826f4aa Mon Sep 17 00:00:00 2001 From: Frank Li Date: Wed, 16 Aug 2017 20:33:07 -0700 Subject: [PATCH] Fix examples script for Windows --- lib/copy-examples.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/copy-examples.js b/lib/copy-examples.js index 82d89ac86c..3c8198ce03 100755 --- a/lib/copy-examples.js +++ b/lib/copy-examples.js @@ -53,7 +53,7 @@ if (feature === "translations") { if (path.basename(file) === "crowdin.yaml") { return; } - const filePath = file.split(folder)[1]; + const filePath = path.resolve(file).split(path.resolve(folder))[1]; try { fs.copySync(file, CWD + filePath, { overwrite: false, @@ -84,7 +84,7 @@ if (feature === "translations") { if (fs.lstatSync(file).isDirectory()) { return; } - const filePath = file.split(folder)[1]; + const filePath = path.resolve(file).split(path.resolve(folder))[1]; try { fs.copySync(file, CWD + filePath, { overwrite: false, @@ -181,7 +181,7 @@ if (feature === "translations") { ) { return; } - const filePath = file.split(folder)[1]; + const filePath = path.resolve(file).split(path.resolve(folder))[1]; try { fs.copySync(file, CWD + filePath, { overwrite: false,