feat(api): return empty plugin paths directly if no info path

This commit is contained in:
John Zhao 2019-05-30 16:30:18 +08:00
parent f54eef8ad1
commit c55db46760

View File

@ -90,7 +90,10 @@ bool dir_exists(const std::string &p) {
std::vector<std::string> get_plugin_paths() {
std::string info_path = utils::get_sdk_install_dir();
info_path.append(MYNTEYE_OS_SEP "share" MYNTEYE_OS_SEP "mynteye" MYNTEYE_OS_SEP "build.info");
if (info_path.empty()) return {};
info_path.append(MYNTEYE_OS_SEP "share" MYNTEYE_OS_SEP "mynteye"
MYNTEYE_OS_SEP "build.info");
cv::FileStorage fs(info_path, cv::FileStorage::READ);
if (!fs.isOpened()) {