unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Shigeru Fukaya <shigeru.fukaya@gmail.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 13553@debbugs.gnu.org
Subject: bug#13553: 24.3.50; incorrect usage of IS_DIRECTORY_SEP
Date: Sun, 27 Jan 2013 01:33:32 +0900	[thread overview]
Message-ID: <AECDFBE2E18E38shigeru.fukaya@gmail.com> (raw)
In-Reply-To: <83libgje5t.fsf@gnu.org>

I greatly appreciate your very quick work, thank you.

I looked through your fix of all functions
(parse_root, get_volume_info, readdir, read_unc_volume, 
logon_network_drive, star_worker, symlink, chase_symlinks)
one by one, and found good at first look.

I'll try build and check it next, anyway.

Yes, my `w32-get-true-file-attributes' is nil. (Isn't it default?)

As for coding symbol, not a few Japanese use 'cp932 not 'shift-jis I 
suppose.  But we need some notice for users.

Regards,
Shigeru


>> From: Shigeru Fukaya <shigeru.fukaya@gmail.com>
>> Date: Sat, 26 Jan 2013 14:52:59 +0900
>> 
>> `file-attributes' returns nil as stat info for a file, its name ending
>> with a character whose second byte is 0x5c.
>> 
>> It is because IS_DIRECTORY_SEP is wrongly used.
>> IS_DIRECTORY_SEP only works when its argument is surely on a start
>> byte of dbcs characters.
>> I find incorrect usage, at least in some functions of `w32.c'.
>> (readdir, stat_worker, read_unc_volume)
>
>Thanks.  I fixed w32.c functions that use IS_DIRECTORY_SEP in revision
>111200 on the emacs-24 branch.  As I cannot easily test DBCS file-name
>encodings on my system, please test the fixed version and see if the
>problem indeed goes away.  The patch relative to emacs-24 branch is
>below, for your convenience.
>
>After looking at the code which I fixed, I'm afraid I don't understand
>why file-attributes returned nil in your case.  The code that uses
>IS_DIRECTORY_SEP there is only a fallback, for when the
>GetFileInformationByHandle API fails for some reason.  You don't say
>what version of Windows you are using, but I won't expect that
>fallback code be executed for any reasonably recent Windows version.
>
>So could you please trace through the code that file-attributes calls,
>and see which use of IS_DIRECTORY_SEP caused the problem?  I'm afraid
>that it's not in w32.c at all, but elsewhere.
>
>
>=== modified file 'src/w32.c'
...





  parent reply	other threads:[~2013-01-26 16:33 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-26  5:52 bug#13553: 24.3.50; incorrect usage of IS_DIRECTORY_SEP Shigeru Fukaya
2013-01-26 10:26 ` Stefan Monnier
2013-01-26 11:16   ` Eli Zaretskii
2013-01-26 12:40     ` Stefan Monnier
2013-01-26 13:23       ` Eli Zaretskii
2013-01-26 22:24         ` Stefan Monnier
2013-01-27  7:06           ` Eli Zaretskii
2013-01-27  8:36             ` Shigeru Fukaya
2013-01-27  9:40               ` Eli Zaretskii
2013-01-26 12:56 ` Eli Zaretskii
2013-01-26 14:06   ` Eli Zaretskii
2013-01-26 16:33   ` Shigeru Fukaya [this message]
2013-01-26 17:37     ` Eli Zaretskii
2013-01-27  6:56       ` Shigeru Fukaya
2013-01-27  7:15         ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=AECDFBE2E18E38shigeru.fukaya@gmail.com \
    --to=shigeru.fukaya@gmail.com \
    --cc=13553@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).