适配-i和-l两种输入路径

Signed-off-by: HanSY <hansiyuan1@huawei.com>
This commit is contained in:
HanSY
2024-12-20 14:49:25 +08:00
parent bf14deb999
commit b92faee755
+3 -2
View File
@@ -136,8 +136,9 @@ uint32_t PackageParser::AddInput(const string& argValue)
return RESTOOL_ERROR;
}
string indexPath = ResourceUtil::GetMainPath(inputPath).Append(RESOURCE_INDEX_FILE).GetPath();
if (ResourceUtil::FileExist(indexPath)) {
string indexPath = FileEntry::FilePath(inputPath).Append(RESOURCE_INDEX_FILE).GetPath();
string indexPathJson = ResourceUtil::GetMainPath(inputPath).Append(RESOURCE_INDEX_FILE).GetPath();
if (ResourceUtil::FileExist(indexPath) || ResourceUtil::FileExist(indexPathJson)) {
inputs_.emplace(inputs_.begin(), inputPath);
} else {
inputs_.push_back(inputPath);