Skip to content

Commit

Permalink
Ignore character checks on filenames
Browse files Browse the repository at this point in the history
  • Loading branch information
iBotPeaches committed Dec 22, 2016
1 parent 57913a4 commit 8ae80ab
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tools/aapt/Resource.cpp
Expand Up @@ -319,9 +319,9 @@ static status_t makeFileResources(Bundle* bundle, const sp<AaptAssets>& assets,
|| (*str >= 'A' && *str <= 'Z') || (*str >= 'A' && *str <= 'Z')
|| (*str >= '0' && *str <= '9') || (*str >= '0' && *str <= '9')
|| *str == '_' || *str == '.')) { || *str == '_' || *str == '.')) {
fprintf(stderr, "%s: Invalid file name: must contain only [a-zA-Z0-9_.]\n", fprintf(stderr, "%s: Invalid file name: must contain only [a-zA-Z0-9_.]. Ignoring...\n",
it.getPath().string()); it.getPath().string());
hasErrors = true; //hasErrors = true;
} }
str++; str++;
} }
Expand Down Expand Up @@ -550,10 +550,10 @@ static int validateAttr(const String8& path, const ResTable& table,
p++; p++;
} }
if (!okay) { if (!okay) {
fprintf(stderr, "%s:%d: Tag <%s> attribute %s has invalid character '%c'.\n", fprintf(stderr, "%s:%d: Tag <%s> attribute %s has invalid character '%c'. Ignoring...\n",
path.string(), parser.getLineNumber(), path.string(), parser.getLineNumber(),
String8(parser.getElementName(&len)).string(), attr, (char)str[i]); String8(parser.getElementName(&len)).string(), attr, (char)str[i]);
return (int)i; return ATTR_OKAY;
} }
} }
} }
Expand Down

0 comments on commit 8ae80ab

Please sign in to comment.