diff options
| author | 2021-11-11 11:20:29 +0000 | |
|---|---|---|
| committer | 2021-11-11 11:20:29 +0000 | |
| commit | 3129a0d453a43a74a3747ee5f3018fc42e340ba9 (patch) | |
| tree | 1874027ff4b11146530139ca09f2664cd0644a0a | |
| parent | b198c9765fab8f19cea24797b736e9c133f8812e (diff) | |
| parent | 94643cc013277966ac9755e5ea5cf9390480e673 (diff) | |
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
| -rw-r--r-- | tools/aapt2/util/Files.cpp | 2 | ||||
| -rw-r--r-- | tools/aapt2/util/Files.h | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/tools/aapt2/util/Files.cpp b/tools/aapt2/util/Files.cpp index 5d2eda3293f0..a266b476bc0d 100644 --- a/tools/aapt2/util/Files.cpp +++ b/tools/aapt2/util/Files.cpp @@ -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; } } diff --git a/tools/aapt2/util/Files.h b/tools/aapt2/util/Files.h index 877cd56d6c69..a2b1b58e5d4f 100644 --- a/tools/aapt2/util/Files.h +++ b/tools/aapt2/util/Files.h @@ -41,6 +41,8 @@ constexpr const char sDirSep = '/'; constexpr const char sPathSep = ':'; #endif +constexpr const char sInvariantDirSep = '/'; + enum class FileType { kUnknown = 0, kNonExistant, |