cvs: php-src /ext/standard filestat.c
| From: | Jani Taskinen | Date: | Tue, 02 Sep 2003 01:22:03 +0000 |
| Subject: | cvs: php-src /ext/standard filestat.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-23558@lists.php.net to get a copy of this message | ||
sniper Mon Sep 1 21:22:03 2003 EDT
Modified files:
/php-src/ext/standard filestat.c
Log:
- Fixed bug #25343 (is_dir() gives warning on FreeBSD).
Index: php-src/ext/standard/filestat.c
diff -u php-src/ext/standard/filestat.c:1.125 php-src/ext/standard/filestat.c:1.126
--- php-src/ext/standard/filestat.c:1.125 Thu Aug 21 02:24:17 2003
+++ php-src/ext/standard/filestat.c Mon Sep 1 21:22:02 2003
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: filestat.c,v 1.125 2003/08/21 06:24:17 jon Exp $ */
+/* $Id: filestat.c,v 1.126 2003/09/02 01:22:02 sniper Exp $ */
#include "php.h"
#include "safe_mode.h"
@@ -607,7 +607,7 @@
BG(lsb).st_mode = 0; /* mark lstat buf invalid */
#endif
if (VCWD_STAT(BG(CurrentStatFile), &BG(sb)) == -1) {
- if (!IS_LINK_OPERATION(type) && (!IS_EXISTS_CHECK(type) || errno != ENOENT)) { /*
fileexists() test must print no error */
+ if (!IS_LINK_OPERATION(type) && (!IS_EXISTS_CHECK(type) || (errno != ENOENT &&
errno != ENOTDIR))) { /* fileexists() test must print no error */
php_error_docref(NULL TSRMLS_CC, E_NOTICE, "Stat failed for %s (errno=%d - %s)",
BG(CurrentStatFile), errno, strerror(errno));
}
efree(BG(CurrentStatFile));
@@ -623,7 +623,7 @@
if (IS_LINK_OPERATION(type) && !BG(lsb).st_mode) {
/* do lstat if the buffer is empty */
if (VCWD_LSTAT(filename, &BG(lsb)) == -1) {
- if (!IS_EXISTS_CHECK(type) || errno != ENOENT) { /* fileexists() test must print no error */
+ if (!IS_EXISTS_CHECK(type) || (errno != ENOENT && errno != ENOTDIR)) { /* fileexists()
test must print no error */
php_error_docref(NULL TSRMLS_CC, E_NOTICE, "Lstat failed for %s (errno=%d - %s)",
BG(CurrentStatFile), errno, strerror(errno));
}
RETURN_FALSE;