Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:15630 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 89371 invoked by uid 1010); 27 Mar 2005 05:57:29 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 89354 invoked from network); 27 Mar 2005 05:57:29 -0000 Received: from unknown (HELO pb1.pair.com) (127.0.0.1) by localhost with SMTP; 27 Mar 2005 05:57:29 -0000 X-Host-Fingerprint: 204.11.219.139 lerdorf.com Linux 2.4/2.6 Received: from ([204.11.219.139:43715] helo=colo) by pb1.pair.com (ecelerity HEAD r(5268)) with SMTP id 17/FC-06428-74B46424 for ; Sun, 27 Mar 2005 00:57:28 -0500 Received: from [192.168.2.106] (c-24-6-1-160.client.comcast.net [24.6.1.160]) (authenticated bits=0) by colo (8.13.3/8.13.3/Debian-9) with ESMTP id j2R5vNb6013449 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Sat, 26 Mar 2005 21:57:24 -0800 Message-ID: <42464B43.60508@lerdorf.com> Date: Sat, 26 Mar 2005 21:57:23 -0800 User-Agent: Mozilla Thunderbird 1.0 (Macintosh/20050217) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Sara Golemon CC: internals@lists.php.net References: <002c01c53244$5a47d870$0b00000a@blaster> <20050327055451.83626.qmail@lists.php.net> In-Reply-To: <20050327055451.83626.qmail@lists.php.net> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] Re: Showstopper? copy() broken for urls and on windows From: rasmus@lerdorf.com (Rasmus Lerdorf) Sara Golemon wrote: >>Patch to fix #32160 (file truncation in copy() when source & destination >>are >>the same) >> >>http://viewcvs.php.net/viewcvs.cgi/php-src/ext/standard/file.c.diff?r1=1.398&r2=1.399 >> >>broke copy() on windows alltogether it seems. It also broke copy($url, >>$local_file) on other platforms since it tries to stat() urls. >> >>I suggest that we remove this fix and release 4.3.11 and 5.0.4 without it. >>I >>do not think that this change requires additional RC. >> > > Holy crap! > > I mean, um... yes, nix that. Or if the stat approach must be used, use > php_stream_url_stat() instead and only `return ret;` IF both stats succeed > AND their inodes are non-zero (wrappers which do not support inode values > but do support some statting are expected to leave these values as 0) AND > their inodes are identical. This still needs a device check on UNIX as well. Inodes are only unique within a single filesystem. -Rasmus