mirror of
https://gitee.com/openharmony/bundlemanager_bundle_framework
synced 2024-11-23 07:09:53 +00:00
!7403 /data/app/el2/100/base/下应用目录中的软链接无法删除
Merge pull request !7403 from small_leek/dellnk
This commit is contained in:
commit
0ee6d8ce23
@ -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