Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit fc1f854e authored by Adam Lesinski's avatar Adam Lesinski Committed by The Android Automerger
Browse files

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
parent 7f0b453b
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1491,7 +1491,7 @@ status_t postProcessImage(const Bundle* bundle, const sp<AaptAssets>& 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);
    }