提交 243d5992 编写于 作者: H HexToString

support 3 types para

上级 69338f1c
...@@ -81,10 +81,6 @@ const std::string& getFileBySuffix( ...@@ -81,10 +81,6 @@ const std::string& getFileBySuffix(
while ((dirp = readdir(dp)) != nullptr) { while ((dirp = readdir(dp)) != nullptr) {
if (dirp->d_type == DT_REG) { if (dirp->d_type == DT_REG) {
for (int idx = 0; idx < suffixVector.size(); ++idx) { for (int idx = 0; idx < suffixVector.size(); ++idx) {
if (suffixVector[idx].compare("*") == 0) {
fileName = static_cast<std::string>(dirp->d_name);
break;
} else {
if (std::string(dirp->d_name).find(suffixVector[idx]) != if (std::string(dirp->d_name).find(suffixVector[idx]) !=
std::string::npos) { std::string::npos) {
fileName = static_cast<std::string>(dirp->d_name); fileName = static_cast<std::string>(dirp->d_name);
...@@ -92,7 +88,6 @@ const std::string& getFileBySuffix( ...@@ -92,7 +88,6 @@ const std::string& getFileBySuffix(
} }
} }
} }
}
if (fileName.length() != 0) break; if (fileName.length() != 0) break;
} }
closedir(dp); closedir(dp);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册