summaryrefslogtreecommitdiff
path: root/src/utils.cc
diff options
context:
space:
mode:
author Shih-wei Liao <sliao@google.com> 2012-04-21 00:20:57 -0700
committer Shih-wei Liao <sliao@google.com> 2012-04-21 00:40:10 -0700
commit795e33081c73a6fead31f45b03fdfb022ef7eab8 (patch)
tree6e7c5d4ac9bd9dfc04c9bb271538b829c69e62f5 /src/utils.cc
parent5b04728e9a61cf038e38820eb8a82a412015d5e3 (diff)
Set materialized file names correctly.
Change-Id: I0848ad4da4f2033dd7804686e65bd44c690a2036
Diffstat (limited to 'src/utils.cc')
-rw-r--r--src/utils.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/utils.cc b/src/utils.cc
index dc1ebffa2f..67fda67e7d 100644
--- a/src/utils.cc
+++ b/src/utils.cc
@@ -906,8 +906,8 @@ const char* GetAndroidData() {
return android_data;
}
-std::string GetArtCacheOrDie() {
- std::string art_cache(StringPrintf("%s/art-cache", GetAndroidData()));
+std::string GetArtCacheOrDie(const char* android_data) {
+ std::string art_cache(StringPrintf("%s/art-cache", android_data));
if (!OS::DirectoryExists(art_cache.c_str())) {
if (StartsWith(art_cache, "/tmp/")) {
@@ -925,7 +925,7 @@ std::string GetArtCacheOrDie() {
}
std::string GetArtCacheFilenameOrDie(const std::string& location) {
- std::string art_cache(GetArtCacheOrDie());
+ std::string art_cache(GetArtCacheOrDie(GetAndroidData()));
CHECK_EQ(location[0], '/') << location;
std::string cache_file(location, 1); // skip leading slash
std::replace(cache_file.begin(), cache_file.end(), '/', '@');