From eec80cef636c5236a7cb15ebb5c1394b9c29f821 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Raphael=20von=20der=20Gr=C3=BCn?= Date: Wed, 30 May 2018 00:13:09 +0200 Subject: [PATCH] Fix two incorrect fs.copySync transformations These were using the parent of the actual target as dest --- index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/index.js b/index.js index 247c7639..30b9fcf2 100644 --- a/index.js +++ b/index.js @@ -309,7 +309,7 @@ function copyTemplateFiles (templateDir, projectDir, isSubDir) { // if template is a www dir if (path.basename(templateDir) === 'www') { copyPath = path.resolve(templateDir); - fs.copySync(copyPath, projectDir); + fs.copySync(copyPath, path.resolve(projectDir, 'www')); } else { var templateFiles = fs.readdirSync(templateDir); // Remove directories, and files that are unwanted @@ -400,7 +400,7 @@ function linkFromTemplate (templateDir, projectDir) { // if template/www/config.xml then copy to project/config.xml copyDst = path.join(projectDir, 'config.xml'); if (!fs.existsSync(copyDst) && fs.existsSync(copySrc)) { - fs.copySync(copySrc, projectDir); + fs.copySync(copySrc, copyDst); } }