Skip to content

Commit

Permalink
Merge pull request #5231 from cb1kenobi/timob-16169_3_2_X
Browse files Browse the repository at this point in the history
[TIMOB-16169] Fixed bug where images in the images directory where being...
  • Loading branch information
ayeung committed Mar 24, 2014
2 parents ea45e41 + 9b6f47b commit dc2f735
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions android/cli/commands/_build.js
Original file line number Diff line number Diff line change
Expand Up @@ -2117,7 +2117,7 @@ AndroidBuilder.prototype.copyResources = function copyResources(next) {
var ignoreDirs = this.ignoreDirs,
ignoreFiles = this.ignoreFiles,
extRegExp = /\.(\w+)$/,
drawableRegExp = /^images\/(high|medium|low|res\-[^\/]+)(\/(.*))?/,
drawableRegExp = /^images\/(high|medium|low|res\-[^\/]+)(\/(.*))/,
drawableDpiRegExp = /^(high|medium|low)$/,
drawableExtRegExp = /((\.9)?\.(png|jpg))$/,
splashScreenRegExp = /^default\.(9\.png|png|jpg)$/,
Expand Down Expand Up @@ -2203,7 +2203,8 @@ AndroidBuilder.prototype.copyResources = function copyResources(next) {
var relPath = from.replace(opts.origSrc, '').replace(/\\/g, '/').replace(/^\//, ''),
m = relPath.match(drawableRegExp),
isDrawable = false;
if (m && m.length >= 4) {

if (m && m.length >= 4 && m[3]) {
var destFilename = m[3].toLowerCase(),
name = destFilename.replace(drawableExtRegExp, ''),
extMatch = destFilename.match(drawableExtRegExp),
Expand Down

0 comments on commit dc2f735

Please sign in to comment.