diff options
author | android-build-prod (mdb) <android-build-team-robot@google.com> | 2018-04-26 18:24:41 +0200 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2018-04-26 18:24:41 +0200 |
commit | 49c7f1cec3ee3ef81e1747c7f9578beec64d9468 (patch) | |
tree | f26b3a858f289f5806b92daf0e776c082a246b8a /applypatch/freecache.cpp | |
parent | Merge "updater_sample: Use stubs libs for android.test.base / runner." (diff) | |
parent | Rename CacheLocation to Paths. (diff) | |
download | android_bootable_recovery-49c7f1cec3ee3ef81e1747c7f9578beec64d9468.tar android_bootable_recovery-49c7f1cec3ee3ef81e1747c7f9578beec64d9468.tar.gz android_bootable_recovery-49c7f1cec3ee3ef81e1747c7f9578beec64d9468.tar.bz2 android_bootable_recovery-49c7f1cec3ee3ef81e1747c7f9578beec64d9468.tar.lz android_bootable_recovery-49c7f1cec3ee3ef81e1747c7f9578beec64d9468.tar.xz android_bootable_recovery-49c7f1cec3ee3ef81e1747c7f9578beec64d9468.tar.zst android_bootable_recovery-49c7f1cec3ee3ef81e1747c7f9578beec64d9468.zip |
Diffstat (limited to 'applypatch/freecache.cpp')
-rw-r--r-- | applypatch/freecache.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/applypatch/freecache.cpp b/applypatch/freecache.cpp index cfab0f6db..dbd4b72b1 100644 --- a/applypatch/freecache.cpp +++ b/applypatch/freecache.cpp @@ -38,7 +38,7 @@ #include <android-base/strings.h> #include "applypatch/applypatch.h" -#include "otautil/cache_location.h" +#include "otautil/paths.h" static int EliminateOpenFiles(const std::string& dirname, std::set<std::string>* files) { std::unique_ptr<DIR, decltype(&closedir)> d(opendir("/proc"), closedir); @@ -95,7 +95,7 @@ static std::vector<std::string> FindExpendableFiles( // We can't delete cache_temp_source; if it's there we might have restarted during // installation and could be depending on it to be there. - if (path == CacheLocation::location().cache_temp_source()) { + if (path == Paths::Get().cache_temp_source()) { continue; } @@ -142,7 +142,7 @@ int MakeFreeSpaceOnCache(size_t bytes_needed) { return 0; #endif - std::vector<std::string> dirs = { "/cache", CacheLocation::location().cache_log_directory() }; + std::vector<std::string> dirs = { "/cache", Paths::Get().cache_log_directory() }; for (const auto& dirname : dirs) { if (RemoveFilesInDirectory(bytes_needed, dirname, FreeSpaceForFile)) { return 0; @@ -172,7 +172,7 @@ bool RemoveFilesInDirectory(size_t bytes_needed, const std::string& dirname, } std::vector<std::string> files; - if (dirname == CacheLocation::location().cache_log_directory()) { + if (dirname == Paths::Get().cache_log_directory()) { // Deletes the log files only. auto log_filter = [](const std::string& file_name) { return android::base::StartsWith(file_name, "last_log") || |