svn commit: samba r19359 - in branches/SAMBA_4_0/source/torture: .

jelmer at samba.org jelmer at samba.org
Tue Oct 17 01:14:02 GMT 2006


Author: jelmer
Date: 2006-10-17 01:14:01 +0000 (Tue, 17 Oct 2006)
New Revision: 19359

WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=19359

Log:
More portable way of figuring out whether something is a directory

Modified:
   branches/SAMBA_4_0/source/torture/subunit.c


Changeset:
Modified: branches/SAMBA_4_0/source/torture/subunit.c
===================================================================
--- branches/SAMBA_4_0/source/torture/subunit.c	2006-10-17 00:56:29 UTC (rev 19358)
+++ branches/SAMBA_4_0/source/torture/subunit.c	2006-10-17 01:14:01 UTC (rev 19359)
@@ -59,12 +59,14 @@
 		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)



More information about the samba-cvs mailing list