mirror of
https://github.com/opencv/opencv.git
synced 2025-06-11 19:59:08 +08:00
Merge pull request #12919 from berak:fix_dnn_sample_common
This commit is contained in:
commit
1c1d653f3a
@ -58,10 +58,12 @@ std::string findFile(const std::string& filename)
|
||||
if (filename.empty() || utils::fs::exists(filename))
|
||||
return filename;
|
||||
|
||||
std::string extraPaths[] = {getenv("OPENCV_DNN_TEST_DATA_PATH"),
|
||||
const char* extraPaths[] = {getenv("OPENCV_DNN_TEST_DATA_PATH"),
|
||||
getenv("OPENCV_TEST_DATA_PATH")};
|
||||
for (int i = 0; i < 2; ++i)
|
||||
{
|
||||
if (extraPaths[i] == NULL)
|
||||
continue;
|
||||
std::string absPath = utils::fs::join(extraPaths[i], utils::fs::join("dnn", filename));
|
||||
if (utils::fs::exists(absPath))
|
||||
return absPath;
|
||||
|
Loading…
Reference in New Issue
Block a user