From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#10733: 24.0.93; w32 file truncation Date: Tue, 07 Feb 2012 06:02:49 +0200 Message-ID: <83ipjjb89i.fsf@gnu.org> References: <20120205.143400.416428493.Takaaki.Ota@am.sony.com> <20120205.161623.484163522.Takaaki.Ota@am.sony.com> <83zkcwbo7t.fsf@gnu.org> <874nv45y9f.fsf@wanadoo.es> <87zkcw3pjf.fsf@wanadoo.es> <83vcnjc1yj.fsf@gnu.org> <87r4y74zew.fsf@wanadoo.es> <83sjinbyez.fsf@gnu.org> <87fwen4k6s.fsf@wanadoo.es> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: QUOTED-PRINTABLE X-Trace: dough.gmane.org 1328587401 19519 80.91.229.3 (7 Feb 2012 04:03:21 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 7 Feb 2012 04:03:21 +0000 (UTC) Cc: lekktu@gmail.com, Takaaki.Ota@am.sony.com, 10733@debbugs.gnu.org To: =?UTF-8?Q?=C3=93scar?= Fuentes Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Feb 07 05:03:20 2012 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1RucGw-0000lz-HU for geb-bug-gnu-emacs@m.gmane.org; Tue, 07 Feb 2012 05:03:14 +0100 Original-Received: from localhost ([::1]:42901 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RucGv-00043Q-W3 for geb-bug-gnu-emacs@m.gmane.org; Mon, 06 Feb 2012 23:03:13 -0500 Original-Received: from eggs.gnu.org ([140.186.70.92]:43877) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RucGs-00043A-GJ for bug-gnu-emacs@gnu.org; Mon, 06 Feb 2012 23:03:11 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RucGr-0002V8-B9 for bug-gnu-emacs@gnu.org; Mon, 06 Feb 2012 23:03:10 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:54332) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RucGr-0002Uo-8U for bug-gnu-emacs@gnu.org; Mon, 06 Feb 2012 23:03:09 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1RucHh-0005It-NS for bug-gnu-emacs@gnu.org; Mon, 06 Feb 2012 23:04:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 07 Feb 2012 04:04:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 10733 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 10733-submit@debbugs.gnu.org id=B10733.132858743020371 (code B ref 10733); Tue, 07 Feb 2012 04:04:01 +0000 Original-Received: (at 10733) by debbugs.gnu.org; 7 Feb 2012 04:03:50 +0000 Original-Received: from localhost ([127.0.0.1]:57955 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1RucHV-0005IU-NQ for submit@debbugs.gnu.org; Mon, 06 Feb 2012 23:03:49 -0500 Original-Received: from mtaout22.012.net.il ([80.179.55.172]:56066) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1RucHT-0005Hy-I4 for 10733@debbugs.gnu.org; Mon, 06 Feb 2012 23:03:48 -0500 Original-Received: from conversion-daemon.a-mtaout22.012.net.il by a-mtaout22.012.net.il (HyperSendmail v2007.08) id <0LZ0009008F9Z200@a-mtaout22.012.net.il> for 10733@debbugs.gnu.org; Tue, 07 Feb 2012 06:02:47 +0200 (IST) Original-Received: from HOME-C4E4A596F7 ([84.229.162.243]) by a-mtaout22.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0LZ0009F18KMHGB0@a-mtaout22.012.net.il>; Tue, 07 Feb 2012 06:02:47 +0200 (IST) In-reply-to: <87fwen4k6s.fsf@wanadoo.es> X-012-Sender: halo1@inter.net.il X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:56618 Archived-At: > From: =D3scar Fuentes > Cc: lekktu@gmail.com, Takaaki.Ota@am.sony.com, 10733@debbugs.gnu.= org > Date: Tue, 07 Feb 2012 00:27:07 +0100 >=20 > >> Symlinks are detected and handled specially on MSVCRT's stat. In > >> aessence, for symlinks it uses fstat. > > > > But fstat probably calls GetFileInformationByHandle under the hoo= d, > > and we already call that function in w32.c:stat. So maybe the fi= x is > > not as ugly and inelegant as you thought. >=20 > Yup. This patch fixes the problem: Thanks. > Maybe it can be integrated in the >=20 > if (!(NILP(Vw32_get_true_file_attributes) ... >=20 > hence reusing the calls to CreateFile and GetFileInformationByHandl= e and > shortening the patch, but as I don't know what > Vw32_get_true_file_attributes does, preferread to follow the safe w= ay. You did right: w32-get-true-file-attributes can be set by the user to nil, if she wants her file ops faster. > And the fix is just for the size. Don't know if there are other > attributes suffer from the same problem. Possibly the right thing i= s to > do what MSVCRT does: >=20 > if is-symlink? > use fstat > fi Since fstat is also reimplemented, I'd rather do what it does inline. For that, we need to know which other attributes are reported different. Or maybe just test for the reparse point up front and do all the work for the target instead.