diff options
author | 2023-09-06 19:46:54 +0000 | |
---|---|---|
committer | 2023-09-06 19:46:54 +0000 | |
commit | aa95ff271a31f903727c5ebc2e4990846c2073d2 (patch) | |
tree | 247609dc143ce6d8fc0c588fb8b8ef15bbd1d172 /tools/aapt/CacheUpdater.h | |
parent | b61b138892b337b9abf7082dde5c7c17eb82ab49 (diff) | |
parent | 4fb86ec92a08a65e2ab52f8e361edb15b380cfc4 (diff) |
Merge "Move String8 path functions to androidfw and aapt" into main am: 713e3930c4 am: 0cfc1c6ddd am: 9a80e1b70c am: 13ab173d41 am: 4fb86ec92a
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2723454
Change-Id: I91016723c47501051b8768c0ee29f8821cab0331
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
Diffstat (limited to 'tools/aapt/CacheUpdater.h')
-rw-r--r-- | tools/aapt/CacheUpdater.h | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/tools/aapt/CacheUpdater.h b/tools/aapt/CacheUpdater.h index 2dc143c6a66d..dc5493f9e500 100644 --- a/tools/aapt/CacheUpdater.h +++ b/tools/aapt/CacheUpdater.h @@ -7,6 +7,7 @@ #ifndef CACHE_UPDATER_H #define CACHE_UPDATER_H +#include <androidfw/PathUtils.h> #include <utils/String8.h> #include <sys/types.h> #include <sys/stat.h> @@ -16,6 +17,8 @@ #include <direct.h> #endif +#include "Utils.h" + using namespace android; /** CacheUpdater @@ -72,14 +75,14 @@ public: do { // As we remove the end of existsPath add it to // the string of paths to create. - toCreate = existsPath.getPathLeaf().appendPath(toCreate); - existsPath = existsPath.getPathDir(); + toCreate = appendPathCopy(getPathLeaf(existsPath), toCreate); + existsPath = getPathDir(existsPath); } while (stat(existsPath.c_str(),&s) == -1); // Walk forwards and build directories as we go do { // Advance to the next segment of the path - existsPath.appendPath(toCreate.walkPath(&remains)); + appendPath(existsPath, walkPath(toCreate, &remains)); toCreate = remains; #ifdef _WIN32 _mkdir(existsPath.c_str()); @@ -101,7 +104,7 @@ public: virtual void processImage(String8 source, String8 dest) { // Make sure we're trying to write to a directory that is extant - ensureDirectoriesExist(dest.getPathDir()); + ensureDirectoriesExist(getPathDir(dest)); preProcessImageToCache(bundle, source, dest); }; |