Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1bcb35bf authored by Hao Li's avatar Hao Li Committed by Narayan Kamath
Browse files

Installd: Fix delete_code_cache() clearing the wrong cache dir



Fix a typo in delete_code_cache() introduced by commit c03de091, 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: default avatarHao Li <hao.i.li@intel.com>
Signed-off-by: default avatarYu Ning <yu.ning@intel.com>
parent 1998615f
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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;