GNU bug report logs -
#10733
24.0.93; w32 file truncation
Previous Next
Full log
View this message in rfc822 format
> From: Óscar Fuentes <ofv <at> wanadoo.es>
> Cc: lekktu <at> gmail.com, Takaaki.Ota <at> am.sony.com, 10733 <at> debbugs.gnu.org
> Date: Tue, 07 Feb 2012 00:27:07 +0100
>
> >> Symlinks are detected and handled specially on MSVCRT's stat. In
> >> aessence, for symlinks it uses fstat.
> >
> > But fstat probably calls GetFileInformationByHandle under the hood,
> > and we already call that function in w32.c:stat. So maybe the fix is
> > not as ugly and inelegant as you thought.
>
> Yup. This patch fixes the problem:
Thanks.
> Maybe it can be integrated in the
>
> if (!(NILP(Vw32_get_true_file_attributes) ...
>
> hence reusing the calls to CreateFile and GetFileInformationByHandle and
> shortening the patch, but as I don't know what
> Vw32_get_true_file_attributes does, preferread to follow the safe way.
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 is to
> do what MSVCRT does:
>
> 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.
This bug report was last modified 12 years and 358 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.