1
0
mirror of https://github.com/php/php-src.git synced 2026-04-10 17:43:13 +02:00
closedir() now really close the directory - used to stay open 'cause the
default-directory resource was "remembered" for arg-less calls.
This commit is contained in:
Thies C. Arntzen
2000-11-04 14:58:50 +00:00
parent 47654fd021
commit b80e71fdac

View File

@@ -102,8 +102,12 @@ static void php_set_default_dir(int id DIRLS_DC)
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 @@ PHP_FUNCTION(closedir)
FETCH_DIRP();
zend_list_delete(dirp->id);
if (dirp->id == DIRG(default_dir)) {
php_set_default_dir(-1);
}
}
/* }}} */