cvs: php4 /ext/standard dir.c

From: Date: Sat, 04 Nov 2000 14:58:51 +0000
Subject: cvs: php4 /ext/standard dir.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-2477@lists.php.net to get a copy of this message
thies Sat Nov 4 06:58:51 2000 EDT Modified files: /php4/ext/standard dir.c Log: fix #7573 closedir() now really close the directory - used to stay open 'cause the default-directory resource was "remembered" for arg-less calls. Index: php4/ext/standard/dir.c diff -u php4/ext/standard/dir.c:1.48 php4/ext/standard/dir.c:1.49 --- php4/ext/standard/dir.c:1.48 Sun Oct 29 01:14:53 2000 +++ php4/ext/standard/dir.c Sat Nov 4 06:58:50 2000 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: dir.c,v 1.48 2000/10/29 09:14:53 thies Exp $ */ +/* $Id: dir.c,v 1.49 2000/11/04 14:58:50 thies Exp $ */ /* {{{ includes/startup/misc */ @@ -102,8 +102,12 @@ if (DIRG(default_dir)!=-1) { zend_list_delete(DIRG(default_dir)); } - DIRG(default_dir) = id; - zend_list_addref(id); + + if (id != -1) { + zend_list_addref(id); + } + + DIRG(default_dir) = id; } @@ -211,6 +215,10 @@ FETCH_DIRP(); zend_list_delete(dirp->id); + + if (dirp->id == DIRG(default_dir)) { + php_set_default_dir(-1); + } } /* }}} */

« previous php.cvs (#2477) next »