Merge "AAPT Files - Permit invariant filepaths for getting file names"

This commit is contained in:
Luke Edgar
2021-11-11 09:17:33 +00:00
committed by Gerrit Code Review
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,