Fixed Windows behavior if folder path on input (#18112)

This commit is contained in:
Georgy Krivoruchko 2023-06-16 20:32:40 +04:00 committed by GitHub
parent 79e935fe97
commit 2f59e5d697
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -181,6 +181,10 @@ CNNNetwork load_ir_v7_network(const std::string& modelPath,
std::string model_path = modelPath;
# endif
if (ov::util::directory_exists(modelPath)) {
return {};
}
// Try to open model file
std::ifstream modelStream(model_path.c_str(), std::ios::binary);
if (!modelStream.is_open())