[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#10733: 24.0.93; w32 file truncation
From: |
Eli Zaretskii |
Subject: |
bug#10733: 24.0.93; w32 file truncation |
Date: |
Tue, 07 Feb 2012 06:02:49 +0200 |
> From: Óscar Fuentes <ofv@wanadoo.es>
> Cc: lekktu@gmail.com, Takaaki.Ota@am.sony.com, 10733@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.
- bug#10733: 24.0.93; w32 file truncation, (continued)
- bug#10733: 24.0.93; w32 file truncation, Lars Ingebrigtsen, 2012/02/06
- bug#10733: 24.0.93; w32 file truncation, Eli Zaretskii, 2012/02/06
- bug#10733: 24.0.93; w32 file truncation, Eli Zaretskii, 2012/02/06
- bug#10733: 24.0.93; w32 file truncation, Óscar Fuentes, 2012/02/06
- bug#10733: 24.0.93; w32 file truncation, Ota, Takaaki, 2012/02/06
- bug#10733: 24.0.93; w32 file truncation, Óscar Fuentes, 2012/02/06
- bug#10733: 24.0.93; w32 file truncation,
Eli Zaretskii <=
- bug#10733: 24.0.93; w32 file truncation, Óscar Fuentes, 2012/02/07
- bug#10733: 24.0.93; w32 file truncation, Eli Zaretskii, 2012/02/07
- bug#10733: 24.0.93; w32 file truncation, Eli Zaretskii, 2012/02/06
bug#10733: 24.0.93; w32 file truncation, Óscar Fuentes, 2012/02/05