From 2187deb0a8cd2e5a8a00132954c815581dcd9390 Mon Sep 17 00:00:00 2001 From: Diego Netto Date: Tue, 19 Aug 2014 18:29:49 -0500 Subject: [PATCH] fix(hook): Ignore non-directory platforms when processing icons and splashscreens. Closes #87 --- templates/hooks/after_prepare/icons_and_splashscreens.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/templates/hooks/after_prepare/icons_and_splashscreens.js b/templates/hooks/after_prepare/icons_and_splashscreens.js index 6d6a384..f961f56 100755 --- a/templates/hooks/after_prepare/icons_and_splashscreens.js +++ b/templates/hooks/after_prepare/icons_and_splashscreens.js @@ -47,7 +47,9 @@ function copyFile (src, dest, ncpOpts, callback) { } // Main -var platforms = fs.readdirSync('platforms'); +var platforms = _.filter(fs.readdirSync('platforms'), function (file) { + return fs.statSync(path.resolve('platforms', file)).isDirectory(); +}); _.each(platforms, function (platform) { var base = path.resolve('platforms', platform, BASES[platform]); glob(base + '/**/*.png', function (err, files) {