[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#13553: 24.3.50; incorrect usage of IS_DIRECTORY_SEP
From: |
Eli Zaretskii |
Subject: |
bug#13553: 24.3.50; incorrect usage of IS_DIRECTORY_SEP |
Date: |
Sat, 26 Jan 2013 15:23:02 +0200 |
> From: Stefan Monnier <monnier@iro.umontreal.ca>
> Cc: shigeru.fukaya@gmail.com, 13553@debbugs.gnu.org
> Date: Sat, 26 Jan 2013 07:40:08 -0500
>
> > You call file-attributes, which encodes the file name and passes it to
> > 'lstat'. The implementation of 'lstat' in w32.c then looks at the
> > last byte of the encoded file name to see if there's a slash or
> > backslash there. Boom!
>
> I see. So, does that meant that w32.c can't faithfully implement lstat
> without doing the moral equivalent of re-decoding its argument?
It can, if we limit such support to Windows codepage encodings. See
the changes I made on the emacs-24 branch revisions 111194 and 111200.
This will still lose if the user binds file-name-coding-system to
something like shift_jis (instead of using its Windows extension
cp932), but there's nothing I can do about that. I was lucky to find
in Windows APIs 2 functions that can move forward and backward by DBCS
characters, and that accept a codepage as their argument (i.e. do not
limit support to the current system codepage). Personally, I think
supporting all possible Windows codepages is good enough.
- bug#13553: 24.3.50; incorrect usage of IS_DIRECTORY_SEP, Shigeru Fukaya, 2013/01/26
- bug#13553: 24.3.50; incorrect usage of IS_DIRECTORY_SEP, Stefan Monnier, 2013/01/26
- bug#13553: 24.3.50; incorrect usage of IS_DIRECTORY_SEP, Eli Zaretskii, 2013/01/26
- bug#13553: 24.3.50; incorrect usage of IS_DIRECTORY_SEP, Stefan Monnier, 2013/01/26
- bug#13553: 24.3.50; incorrect usage of IS_DIRECTORY_SEP,
Eli Zaretskii <=
- bug#13553: 24.3.50; incorrect usage of IS_DIRECTORY_SEP, Stefan Monnier, 2013/01/26
- bug#13553: 24.3.50; incorrect usage of IS_DIRECTORY_SEP, Eli Zaretskii, 2013/01/27
- bug#13553: 24.3.50; incorrect usage of IS_DIRECTORY_SEP, Shigeru Fukaya, 2013/01/27
- bug#13553: 24.3.50; incorrect usage of IS_DIRECTORY_SEP, Eli Zaretskii, 2013/01/27
bug#13553: 24.3.50; incorrect usage of IS_DIRECTORY_SEP, Eli Zaretskii, 2013/01/26