bool installed = true;
AppLog("[libtpk] pkg_plugin_pkg_is_installed() is called");
- AppLog("[libtpk] package=[%s]", pkg_name);
TryCatch(pkg_name, err = PKG_ERROR, "[osp-installer][libtpk] package is null");
result r = E_SUCCESS;
AppLog("[libtpk] pkg_plugin_get_pkg_detail_info() is called");
- AppLog("[libtpk] package=[%s]", pkg_name);
TryCatch(pkg_name, err = PKG_ERROR, "[osp-installer][libtpk] package is null");
DIR *dp = NULL;
struct dirent *ep = NULL;
struct stat fileinfo;
- char fileName[FILENAME_MAX] = { 0, };
+ char file[FILENAME_MAX] = { 0, };
char *pDirName = null;
pDirName = _StringConverter::CopyToCharArrayN(rootPath);
continue;
}
- snprintf(fileName, FILENAME_MAX, "%s/%s", pDirName, ep->d_name);
+ snprintf(file, FILENAME_MAX, "%s/%s", pDirName, ep->d_name);
- if (lstat(fileName, &fileinfo) < 0)
+ if (lstat(file, &fileinfo) < 0)
{
continue;
}
if (S_ISLNK(fileinfo.st_mode))
{
- AppLog("[libtpk] SYMLINK=%s", fileName);
+ AppLog("[libtpk] SYMLINK=%s", file);
total += BLOCK_SIZE;
continue;
}
else if (S_ISDIR(fileinfo.st_mode))
{
- ret = pkg_get_directory_size(fileName);
+ ret = pkg_get_directory_size(file);
ret += fileinfo.st_size;
total += ret;
- AppLog("[libtpk] DIR=%s, size=%d[%dK],", fileName, (int)ret, (int)(ret/1024));
+ AppLog("[libtpk] DIR=%s, size=%d[%dK],", file, (int)ret, (int)(ret/1024));
}
else
{
if (q)
{
- AppLog("[libtpk] File=%s, size=%d[%dK]", fileName, (q * BLOCK_SIZE), (q * BLOCK_SIZE)/1024);
+ AppLog("[libtpk] File=%s, size=%d[%dK]", file, (q * BLOCK_SIZE), (q * BLOCK_SIZE)/1024);
}
}
}
}
bool
-InstallerUtil::ChangeDirectoryPermission(const String& filePath, int mode, bool appOwner)
+InstallerUtil::ChangeDirectoryPermission(const String& file, int mode, bool appOwner)
{
result r = E_SUCCESS;
bool res = false;
- res = File::IsFileExist(filePath);
+ res = File::IsFileExist(file);
if (res == false)
{
- AppLog("path=[%ls]: skip", filePath.GetPointer());
+ AppLog("path=[%ls]: skip", file.GetPointer());
return true;
}
std::unique_ptr<Directory> pDir(new (std::nothrow) Directory);
TryReturn(pDir, false, "pDir is null.");
- r = pDir->Construct(filePath);
- TryReturn(!IsFailed(r), false, "pDir->Construct() failed, filePath=[%ls]", filePath.GetPointer());
+ r = pDir->Construct(file);
+ TryReturn(!IsFailed(r), false, "pDir->Construct() failed, file=[%ls]", file.GetPointer());
std::unique_ptr<DirEnumerator> pDirEnum(pDir->ReadN());
TryReturn(pDirEnum, false, "pDirEnum is null.");
continue;
}
- String entryDir = filePath;
+ String entryDir = file;
entryDir += L"/";
entryDir += entryName;
}
AppLog("path=[%ls], mode=[%04o], appOwner=[%s]",
- filePath.GetPointer(), mode, appOwner?"true":"false");
+ file.GetPointer(), mode, appOwner?"true":"false");
return true;
}