Skip to content

Commit

Permalink
Fix file loading
Browse files Browse the repository at this point in the history
ONE-DCO-1.0-Signed-off-by: Hyeongseok Oh <[email protected]>
  • Loading branch information
hseok-oh committed Dec 18, 2024
1 parent 92463ce commit 57b22ee
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion runtime/onert/api/nnfw/src/nnfw_session.cc
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,7 @@ NNFW_STATUS nnfw_session::load_model_from_path(const char *path)
try
{
std::filesystem::path filename{path};
if (filename.has_extension())
if (!std::filesystem::is_directory(filename) && filename.has_extension())
{
std::string model_type = filename.extension().string().substr(1); // + 1 to exclude dot
return loadModelFile(filename, model_type);
Expand Down

0 comments on commit 57b22ee

Please sign in to comment.