summaryrefslogtreecommitdiff
path: root/source4/torture
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2006-10-17 01:14:01 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 14:21:16 -0500
commit1447b7aed93a016f1b762bf1631548aefc7ae2ad (patch)
treea87267ad0ade13c1be084f1d5503a731d037182d /source4/torture
parentc554e2168bbc7c89bd02768a45ce9a8c7dd57b43 (diff)
downloadsamba-1447b7aed93a016f1b762bf1631548aefc7ae2ad.tar.gz
samba-1447b7aed93a016f1b762bf1631548aefc7ae2ad.tar.bz2
samba-1447b7aed93a016f1b762bf1631548aefc7ae2ad.zip
r19359: More portable way of figuring out whether something is a directory
(This used to be commit 96dff03a2b357f937daa4296d4cedd0249f68ece)
Diffstat (limited to 'source4/torture')
-rw-r--r--source4/torture/subunit.c10
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)