cvs: php4(PHP_4_3) /ext/standard dir.c

From: Date: Tue, 03 Jun 2003 11:07:40 +0000
Subject: cvs: php4(PHP_4_3) /ext/standard dir.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-21477@lists.php.net to get a copy of this message
hholzgra Tue Jun 3 07:07:40 2003 EDT Modified files: (Branch: PHP_4_3) /php4/ext/standard dir.c Log: MFH Index: php4/ext/standard/dir.c diff -u php4/ext/standard/dir.c:1.109.2.5 php4/ext/standard/dir.c:1.109.2.6 --- php4/ext/standard/dir.c:1.109.2.5 Mon May 5 08:17:02 2003 +++ php4/ext/standard/dir.c Tue Jun 3 07:07:40 2003 @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: dir.c,v 1.109.2.5 2003/05/05 12:17:02 thies Exp $ */ +/* $Id: dir.c,v 1.109.2.6 2003/06/03 11:07:40 hholzgra Exp $ */ /* {{{ includes/startup/misc */ @@ -398,11 +398,16 @@ RETURN_FALSE; } +#ifndef GLOB_NOMATCH + // now catch the FreeBSD style of "no matches" + if (!globbuf.gl_pathc) { + array_init(return_value); + return; + } +#endif + /* we assume that any glob pattern will match files from one directory only so checking the dirname of the first match should be sufficient */ - if (!globbuf.gl_pathv) { - RETURN_FALSE; - } strncpy(cwd, globbuf.gl_pathv[0], MAXPATHLEN); if (PG(safe_mode) && (!php_checkuid(cwd, NULL, CHECKUID_CHECK_FILE_AND_DIR))) { RETURN_FALSE;

« previous php.cvs (#21477) next »