mirror of
https://gitee.com/openharmony/bundlemanager_bundle_framework
synced 2024-11-23 07:09:53 +00:00
delete lnk file in /data/app/el2/userid/base
Signed-off-by: small_leek <xiasenlin1@huawei.com>
This commit is contained in:
parent
b7821e6463
commit
212cafd7e9
@ -833,11 +833,14 @@ bool InstalldOperator::DeleteFilesExceptDirs(const std::string &dataPath, const
|
||||
filePath = OHOS::IncludeTrailingPathDelimiter(dataPath) + std::string(ptr->d_name);
|
||||
if (ptr->d_type == DT_DIR) {
|
||||
ret = OHOS::ForceRemoveDirectory(filePath);
|
||||
} else {
|
||||
if (access(filePath.c_str(), F_OK) == 0) {
|
||||
ret = OHOS::RemoveFile(filePath);
|
||||
}
|
||||
continue;
|
||||
}
|
||||
if (access(filePath.c_str(), F_OK) == 0) {
|
||||
ret = OHOS::RemoveFile(filePath);
|
||||
continue;
|
||||
}
|
||||
// maybe lnk_file
|
||||
ret = CheckAndDeleteLinkFile(filePath);
|
||||
}
|
||||
closedir(dir);
|
||||
return ret;
|
||||
|
Loading…
Reference in New Issue
Block a user