diff options
-rw-r--r-- | source4/torture/subunit.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/source4/torture/subunit.c b/source4/torture/subunit.c index f7c14aa023..2a1e6e1cb6 100644 --- a/source4/torture/subunit.c +++ b/source4/torture/subunit.c @@ -59,12 +59,14 @@ bool torture_subunit_load_testsuites(const char *directory, bool recursive, if (entry->d_name[0] == '.') continue; - if (!recursive && entry->d_type & DT_DIR) + filename = talloc_asprintf(NULL, "%s/%s", directory, entry->d_name); + + if (!recursive && directory_exist(filename)) { + talloc_free(filename); continue; + } - filename = talloc_asprintf(NULL, "%s/%s", directory, entry->d_name); - - if (entry->d_type & DT_DIR) { + if (directory_exist(filename)) { child = torture_find_suite(parent, entry->d_name); exists = (child != NULL); if (child == NULL) |