Lines Matching refs:dstPath
50 static int HnpGenerateSoftLinkAllByJson(const char *installPath, const char *dstPath, HnpCfgInfo *hnpCfg)
57 if (access(dstPath, F_OK) != 0) {
58 int ret = mkdir(dstPath, S_IRWXU | S_IRWXG | S_IROTH | S_IXOTH);
60 HNP_LOGE("mkdir [%{public}s] unsuccess, ret=%{public}d, errno:%{public}d", dstPath, ret, errno);
89 ret = sprintf_s(dstFile, MAX_FILE_PATH_LEN, "%s/%s", dstPath, fileName);
106 static int HnpGenerateSoftLinkAll(const char *installPath, const char *dstPath)
126 if (access(dstPath, F_OK) != 0) {
127 ret = mkdir(dstPath, S_IRWXU | S_IRWXG | S_IROTH | S_IXOTH);
130 HNP_LOGE("mkdir [%{public}s] unsuccess, ret=%{public}d, errno:%{public}d", dstPath, ret, errno);
147 ret = sprintf_s(dstFile, MAX_FILE_PATH_LEN, "%s/%s", dstPath, entry->d_name);
290 char dstPath[MAX_FILE_PATH_LEN];
293 if (sprintf_s(dstPath, MAX_FILE_PATH_LEN, HNP_DEFAULT_INSTALL_ROOT_PATH"/%d", uid) < 0) {
299 if (access(dstPath, F_OK) != 0) {
300 HNP_LOGE("hnp uninstall uid path[%{public}s] is not exist", dstPath);
535 static int HapReadAndInstall(const char *dstPath, HapInstallInfo *installInfo, HnpSignMapInfo *hnpSignMapInfos,
554 if ((sprintf_s(hnpInfo.hnpBasePath, MAX_FILE_PATH_LEN, "%s/hnppublic", dstPath) < 0) ||
562 if ((sprintf_s(hnpInfo.hnpBasePath, MAX_FILE_PATH_LEN, "%s/hnp/%s", dstPath,
692 static int CheckInstallPath(char *dstPath, HapInstallInfo *installInfo)
695 if (sprintf_s(dstPath, MAX_FILE_PATH_LEN, HNP_DEFAULT_INSTALL_ROOT_PATH"/%d", installInfo->uid) < 0) {
701 if (access(dstPath, F_OK) != 0) {
702 HNP_LOGE("hnp install uid path[%{public}s] is not exist", dstPath);
707 return SetHnpRestorecon(dstPath);
712 char dstPath[MAX_FILE_PATH_LEN];
721 if ((ret = CheckInstallPath(dstPath, installInfo)) != 0 ||
734 ret = HapReadAndInstall(dstPath, installInfo, hnpSignMapInfos, &count);