std::string dataPath = *it + "/" + pkgId + "/data/";
if (!dataPath.empty() && exist(dataPath)) {
std::string pDataFile = dataPath + PROFILE_BASENAME;
-
if (exist(pDataFile)) {
if (!removeFile(pDataFile)) {
_SERR("Failed to remove profile data file (%s).", pDataFile.c_str());
{
// To reduce repeated getUserIds calls, get uids here.
std::vector<std::string> userAppRoots = getUserAppRoots();
+ if (userAppRoots.empty()) {
+ _SERR("Failed to get app root directories of users");
+ return;
+ }
int ret = pkgmgrinfo_appinfo_get_installed_list(removeAppProfileListCb, &userAppRoots);
if (ret != PMINFO_R_OK) {
_SERR("Failed to get installed list");