Merge "AAPT Files - Permit invariant filepaths for getting file names" am: 0ba2a37eaf am: c8b5598a14 am: b568a8202c am: 4b7dd9fced am: 94643cc013
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1884590 Change-Id: I2fbc7dc5f3aea8d574ed00d3ab4f6536fc2bdae0
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -41,6 +41,8 @@ constexpr const char sDirSep = '/';
|
||||
constexpr const char sPathSep = ':';
|
||||
#endif
|
||||
|
||||
constexpr const char sInvariantDirSep = '/';
|
||||
|
||||
enum class FileType {
|
||||
kUnknown = 0,
|
||||
kNonExistant,
|
||||
|
||||
Reference in New Issue
Block a user