Fix examples script for Windows

This commit is contained in:
Frank Li 2017-08-16 20:33:07 -07:00
parent 2a196cb1bc
commit 34ad3fac8b

View file

@ -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,