From 9306a474e1b7509f4cdf252359dc301ce933ca1d Mon Sep 17 00:00:00 2001 From: Adam Lesinski Date: Fri, 17 Oct 2014 14:40:17 -0700 Subject: AAPT: Fix an issue where a resource name was incorrectly derived on Windows Calling String8::getLeaf() will assume the system's file path separator, however the source string was already converted to a unix path. getLeaf() would therefore not find any occurence of '\' and would return the full path. Bug:18036805 Change-Id: Ic2bfac0cc553406740204a296327e266b05c0eff --- tools/aapt/Images.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tools/aapt') diff --git a/tools/aapt/Images.cpp b/tools/aapt/Images.cpp index 56d1650..5d4a6ac 100644 --- a/tools/aapt/Images.cpp +++ b/tools/aapt/Images.cpp @@ -1491,7 +1491,7 @@ status_t postProcessImage(const Bundle* bundle, const sp& assets, // At this point, now that we have all the resource data, all we need to // do is compile XML files. if (strcmp(ext.string(), ".xml") == 0) { - String16 resourceName(parseResourceName(file->getPath().getPathLeaf())); + String16 resourceName(parseResourceName(file->getSourceFile().getPathLeaf())); return compileXmlFile(bundle, assets, resourceName, file, table); } -- cgit v1.1