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);