Handle DT_UNKNOWN as DT_REG during file list-up (#13811)

* Handle DT_UNKNOWN as DT_REG during file list-up

Some filesystem does not return dt_type properly. (such as sshfs)
Without this fix, openvino fails to search frontend when mounted on
sshfs.

* style fix

* style fix
This commit is contained in:
Mingyu Kim 2022-11-10 17:21:45 +09:00 committed by GitHub
parent 1b2aff95a1
commit c478f7b266
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -208,6 +208,10 @@ static void iterate_files_worker(const std::string& path,
}
break;
case DT_REG:
case DT_UNKNOWN:
// Comment from READDIR(3):
// only some filesystems have full support for returning the file type in d_type.
// All applications must properly handle a return of DT_UNKNOWN.
func(path_name, false);
break;
default: