1 Star 1 Fork 0

mjz/每日一题训练

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
patch 1.52 KB
一键复制 编辑 原始数据 按行查看 历史
mjz 提交于 2024-02-18 02:59 . 删除ap
diff --git a/services/bundlemgr/src/aot/aot_handler.cpp b/services/bundlemgr/src/aot/aot_handler.cpp
index bdc25988e..b23b7baba 100644
--- a/services/bundlemgr/src/aot/aot_handler.cpp
+++ b/services/bundlemgr/src/aot/aot_handler.cpp
@@ -213,10 +213,18 @@ void AOTHandler::HandleResetAOT(const std::string &bundleName, bool isAllBundle)
bundleNames = {bundleName};
}
std::for_each(bundleNames.cbegin(), bundleNames.cend(), [dataMgr](const auto &bundleToReset) {
- std::string removeDir = Constants::ARK_CACHE_PATH + bundleToReset;
- ErrCode ret = InstalldClient::GetInstance()->RemoveDir(removeDir);
- APP_LOGD("removeDir %{public}s, ret : %{public}d", removeDir.c_str(), ret);
+ std::string removeCacheDir = Constants::ARK_CACHE_PATH + bundleToReset;
+ ErrCode ret = InstalldClient::GetInstance()->RemoveDir(removeCacheDir);
+ APP_LOGD("removeCacheDir %{public}s, ret : %{public}d", removeCacheDir.c_str(), ret);
dataMgr->ResetAOTFlagsCommand(bundleToReset);
+ std::vector<int32_t> userIds = dataMgr->GetUserIds(bundleToReset);
+ for (int32_t userId : userIds) {
+ std::string removeApDir;
+ removeApDir.append(Constants::ARK_PROFILE_PATH).append(std::to_string(userId))
+ .append(Constants::PATH_SEPARATOR).append(bundleToReset);
+ ErrCode ret = InstalldClient::GetInstance()->CleanBundleDataDir(removeApDir);
+ APP_LOGD("removeApDir %{public}s, ret : %{public}d", removeApDir.c_str(), ret);
+ }
});
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/mjz13782805465/daily-one-question-training.git
[email protected]:mjz13782805465/daily-one-question-training.git
mjz13782805465
daily-one-question-training
每日一题训练
master

搜索帮助