Installd: Fix delete_code_cache() clearing the wrong cache dir

Fix a typo in delete_code_cache() introduced by commit c03de09, which
causes the function to empty /data/data/<package_name>/cache/ rather
than /data/data/<package_name>/code_cache/.

The following CTS test case should now pass:

 com.android.cts.appsecurity.SplitTests#testClearCodeCache

Change-Id: I2d9452d70ed39b3ea29ad65fb35e788c2fef5100
Signed-off-by: Hao Li <hao.i.li@intel.com>
Signed-off-by: Yu Ning <yu.ning@intel.com>
This commit is contained in:
Hao Li 2015-06-25 14:31:56 +12:00 committed by Narayan Kamath
parent 1998615f8b
commit 1bcb35bf87
1 changed files with 1 additions and 1 deletions

View File

@ -299,7 +299,7 @@ int delete_cache(const char *uuid, const char *pkgname, userid_t userid)
int delete_code_cache(const char *uuid, const char *pkgname, userid_t userid)
{
std::string _codecachedir(
create_package_data_path(uuid, pkgname, userid) + CACHE_DIR_POSTFIX);
create_package_data_path(uuid, pkgname, userid) + CODE_CACHE_DIR_POSTFIX);
const char* codecachedir = _codecachedir.c_str();
struct stat s;