cvs: php-src(PHP_5_2) /ext/standard file.c /ext/standard/tests/file copy_variation12.phpt

From: Date: Sun, 12 Aug 2007 17:09:59 +0000
Subject: cvs: php-src(PHP_5_2) /ext/standard file.c /ext/standard/tests/file copy_variation12.phpt
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-45875@lists.php.net to get a copy of this message
iliaa Sun Aug 12 17:09:59 2007 UTC Modified files: (Branch: PHP_5_2) /php-src/ext/standard file.c /php-src/ext/standard/tests/file copy_variation12.phpt Log: Fixed copy test as well as the directory check inside copy() function http://cvs.php.net/viewvc.cgi/php-src/ext/standard/file.c?r1=1.409.2.6.2.25&r2=1.409.2.6.2.26&diff_format=u Index: php-src/ext/standard/file.c diff -u php-src/ext/standard/file.c:1.409.2.6.2.25 php-src/ext/standard/file.c:1.409.2.6.2.26 --- php-src/ext/standard/file.c:1.409.2.6.2.25 Sat Aug 11 04:34:59 2007 +++ php-src/ext/standard/file.c Sun Aug 12 17:09:59 2007 @@ -21,7 +21,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: file.c,v 1.409.2.6.2.25 2007/08/11 04:34:59 hirokawa Exp $ */ +/* $Id: file.c,v 1.409.2.6.2.26 2007/08/12 17:09:59 iliaa Exp $ */ /* Synced with php 3.0 revision 1.218 1999-06-16 [ssb] */ @@ -1765,13 +1765,13 @@ default: /* failed to stat file, does not exist? */ return ret; } - if (php_stream_stat_path_ex(dest, PHP_STREAM_URL_STAT_QUIET, &dest_s, NULL) != 0) { - goto safe_to_copy; - } if (S_ISDIR(src_s.sb.st_mode)) { php_error_docref(NULL TSRMLS_CC, E_WARNING, "The first argument to copy() function cannot be a directory"); return FAILURE; } + if (php_stream_stat_path_ex(dest, PHP_STREAM_URL_STAT_QUIET, &dest_s, NULL) != 0) { + goto safe_to_copy; + } if (!src_s.sb.st_ino || !dest_s.sb.st_ino) { goto no_stat; } http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/copy_variation12.phpt?r1=1.1.2.1&r2=1.1.2.2&diff_format=u Index: php-src/ext/standard/tests/file/copy_variation12.phpt diff -u php-src/ext/standard/tests/file/copy_variation12.phpt:1.1.2.1 php-src/ext/standard/tests/file/copy_variation12.phpt:1.1.2.2 --- php-src/ext/standard/tests/file/copy_variation12.phpt:1.1.2.1 Fri Aug 10 02:57:30 2007 +++ php-src/ext/standard/tests/file/copy_variation12.phpt Sun Aug 12 17:09:59 2007 @@ -41,8 +41,12 @@ --EXPECTF-- *** Test copy() function: Trying to create a copy of an existing dir *** + +Warning: copy(): The first argument to copy() function cannot be a directory in %s/copy_variation12.php on line %d bool(false) bool(false) int(4096) -int(0) + +Warning: filesize(): stat failed for %s/copy_copy_variation12 in %s/copy_variation12.php on line %d +bool(false) *** Done ***

« previous php.cvs (#45875) next »