fix(prepare): mapImageResources always returning [] (#1136)

This commit is contained in:
Raphael von der Grün 2020-12-04 09:14:19 +01:00 committed by GitHub
parent 97e2d15634
commit 55feadff05
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -665,7 +665,8 @@ function cleanIcons (projectRoot, projectConfig, platformResourcesDir) {
*/ */
function mapImageResources (rootDir, subDir, type, resourceName) { function mapImageResources (rootDir, subDir, type, resourceName) {
const pathMap = {}; 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); const imagePath = path.join(subDir, drawableFolder, resourceName);
pathMap[imagePath] = null; pathMap[imagePath] = null;
}); });