From 55feadff0519fa294be34c22ff6fbb913efd1b48 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Raphael=20von=20der=20Gr=C3=BCn?= Date: Fri, 4 Dec 2020 09:14:19 +0100 Subject: [PATCH] fix(prepare): mapImageResources always returning [] (#1136) --- bin/templates/cordova/lib/prepare.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bin/templates/cordova/lib/prepare.js b/bin/templates/cordova/lib/prepare.js index ba682448..04009943 100644 --- a/bin/templates/cordova/lib/prepare.js +++ b/bin/templates/cordova/lib/prepare.js @@ -665,7 +665,8 @@ function cleanIcons (projectRoot, projectConfig, platformResourcesDir) { */ function mapImageResources (rootDir, subDir, type, resourceName) { const pathMap = {}; - glob.sync(type + '-*', { cwd: path.join(rootDir, subDir) }).forEach(drawableFolder => { + const globOptions = { cwd: path.join(rootDir, subDir), onlyDirectories: true }; + glob.sync(type + '-*', globOptions).forEach(drawableFolder => { const imagePath = path.join(subDir, drawableFolder, resourceName); pathMap[imagePath] = null; });