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; });