cvs: php-src(PHP_5_2) / NEWS /ext/standard filestat.c

From: Date: Fri, 19 May 2006 02:51:00 +0000
Subject: cvs: php-src(PHP_5_2) / NEWS /ext/standard filestat.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-38279@lists.php.net to get a copy of this message
iliaa Fri May 19 02:51:00 2006 UTC Modified files: (Branch: PHP_5_2) /php-src/ext/standard filestat.c /php-src NEWS Log: Fixed bug #37505 (touch() truncates large files). http://cvs.php.net/viewcvs.cgi/php-src/ext/standard/filestat.c?r1=1.136.2.8&r2=1.136.2.8.2.1&diff_format=u Index: php-src/ext/standard/filestat.c diff -u php-src/ext/standard/filestat.c:1.136.2.8 php-src/ext/standard/filestat.c:1.136.2.8.2.1 --- php-src/ext/standard/filestat.c:1.136.2.8 Tue Apr 25 08:41:02 2006 +++ php-src/ext/standard/filestat.c Fri May 19 02:51:00 2006 @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: filestat.c,v 1.136.2.8 2006/04/25 08:41:02 tony2001 Exp $ */ +/* $Id: filestat.c,v 1.136.2.8.2.1 2006/05/19 02:51:00 iliaa Exp $ */ #include "php.h" #include "safe_mode.h" @@ -538,7 +538,6 @@ { zval **filename, **filetime, **fileatime; int ret; - struct stat sb; FILE *file; struct utimbuf newtimebuf; struct utimbuf *newtime = NULL; @@ -575,8 +574,7 @@ } /* create the file if it doesn't exist already */ - ret = VCWD_STAT(Z_STRVAL_PP(filename), &sb); - if (ret == -1) { + if (VCWD_ACCESS(Z_STRVAL_PP(filename), F_OK) != 0) { file = VCWD_FOPEN(Z_STRVAL_PP(filename), "w"); if (file == NULL) { php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unable to create file %s because %s", Z_STRVAL_PP(filename), strerror(errno)); http://cvs.php.net/viewcvs.cgi/php-src/NEWS?r1=1.2027.2.547.2.34&r2=1.2027.2.547.2.35&diff_format=u Index: php-src/NEWS diff -u php-src/NEWS:1.2027.2.547.2.34 php-src/NEWS:1.2027.2.547.2.35 --- php-src/NEWS:1.2027.2.547.2.34 Thu May 18 22:12:26 2006 +++ php-src/NEWS Fri May 19 02:51:00 2006 @@ -41,6 +41,7 @@ - Added RFC2397 (data: stream) support. (Marcus) - Fixed bug #37510 (session_regenerate_id changes session_id() even on failure). (Hannes) +- Fixed bug #37505 (touch() truncates large files). (Ilia) - Fixed bug #37487 (oci_fetch_array() array-type should always default to OCI_BOTH). (Tony) - Fixed bug #37395 (recursive mkdir() fails to create nonexistent directories

« previous php.cvs (#38279) next »