From b92faee755c31ee4042b0644a83ee98dde923b10 Mon Sep 17 00:00:00 2001 From: HanSY Date: Fri, 20 Dec 2024 14:49:25 +0800 Subject: [PATCH] =?UTF-8?q?=E9=80=82=E9=85=8D-i=E5=92=8C-l=E4=B8=A4?= =?UTF-8?q?=E7=A7=8D=E8=BE=93=E5=85=A5=E8=B7=AF=E5=BE=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: HanSY --- src/cmd_parser.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/cmd_parser.cpp b/src/cmd_parser.cpp index d3888b7..2a12a3d 100644 --- a/src/cmd_parser.cpp +++ b/src/cmd_parser.cpp @@ -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);