Merge "AAPT Files - Permit invariant filepaths for getting file names" am: 0ba2a37eaf am: c8b5598a14
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1884590 Change-Id: If8e291ce3549f41593cdafa37b62e10e748ff6c5
This commit is contained in:
@@ -154,7 +154,7 @@ StringPiece GetFilename(const StringPiece& path) {
|
|||||||
const char* end = path.end();
|
const char* end = path.end();
|
||||||
const char* last_dir_sep = path.begin();
|
const char* last_dir_sep = path.begin();
|
||||||
for (const char* c = path.begin(); c != end; ++c) {
|
for (const char* c = path.begin(); c != end; ++c) {
|
||||||
if (*c == sDirSep) {
|
if (*c == sDirSep || *c == sInvariantDirSep) {
|
||||||
last_dir_sep = c + 1;
|
last_dir_sep = c + 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -41,6 +41,8 @@ constexpr const char sDirSep = '/';
|
|||||||
constexpr const char sPathSep = ':';
|
constexpr const char sPathSep = ':';
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
constexpr const char sInvariantDirSep = '/';
|
||||||
|
|
||||||
enum class FileType {
|
enum class FileType {
|
||||||
kUnknown = 0,
|
kUnknown = 0,
|
||||||
kNonexistant,
|
kNonexistant,
|
||||||
|
|||||||
Reference in New Issue
Block a user