Merge "AAPT Files - Permit invariant filepaths for getting file names" am: 0ba2a37eaf am: c8b5598a14 am: b568a8202c am: 4b7dd9fced

Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1884590

Change-Id: Ibcb2b129b94db1d3a83160c2b413792c24509c79
This commit is contained in:
Luke Edgar
2021-11-11 11:02:04 +00:00
committed by Automerger Merge Worker
2 changed files with 3 additions and 1 deletions

View File

@@ -154,7 +154,7 @@ StringPiece GetFilename(const StringPiece& path) {
const char* end = path.end();
const char* last_dir_sep = path.begin();
for (const char* c = path.begin(); c != end; ++c) {
if (*c == sDirSep) {
if (*c == sDirSep || *c == sInvariantDirSep) {
last_dir_sep = c + 1;
}
}

View File

@@ -41,6 +41,8 @@ constexpr const char sDirSep = '/';
constexpr const char sPathSep = ':';
#endif
constexpr const char sInvariantDirSep = '/';
enum class FileType {
kUnknown = 0,
kNonexistant,