From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Shigeru Fukaya Newsgroups: gmane.emacs.bugs Subject: bug#13553: 24.3.50; incorrect usage of IS_DIRECTORY_SEP Date: Sun, 27 Jan 2013 01:33:32 +0900 Message-ID: References: <83libgje5t.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1359218034 10049 80.91.229.3 (26 Jan 2013 16:33:54 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 26 Jan 2013 16:33:54 +0000 (UTC) Cc: 13553@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Jan 26 17:34:13 2013 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Tz8ho-0003Bi-Fi for geb-bug-gnu-emacs@m.gmane.org; Sat, 26 Jan 2013 17:34:12 +0100 Original-Received: from localhost ([::1]:58247 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Tz8hW-0002MP-Ta for geb-bug-gnu-emacs@m.gmane.org; Sat, 26 Jan 2013 11:33:54 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:39735) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Tz8hS-0002Ld-Nm for bug-gnu-emacs@gnu.org; Sat, 26 Jan 2013 11:33:53 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Tz8hQ-0005U0-4y for bug-gnu-emacs@gnu.org; Sat, 26 Jan 2013 11:33:50 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:45135) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Tz8hQ-0005Tw-12 for bug-gnu-emacs@gnu.org; Sat, 26 Jan 2013 11:33:48 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1Tz8he-0005lP-7o for bug-gnu-emacs@gnu.org; Sat, 26 Jan 2013 11:34:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Shigeru Fukaya Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 26 Jan 2013 16:34:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 13553 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 13553-submit@debbugs.gnu.org id=B13553.135921803422143 (code B ref 13553); Sat, 26 Jan 2013 16:34:02 +0000 Original-Received: (at 13553) by debbugs.gnu.org; 26 Jan 2013 16:33:54 +0000 Original-Received: from localhost ([127.0.0.1]:50599 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Tz8hW-0005l5-1X for submit@debbugs.gnu.org; Sat, 26 Jan 2013 11:33:54 -0500 Original-Received: from mail-da0-f47.google.com ([209.85.210.47]:34427) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Tz8hT-0005kx-P1 for 13553@debbugs.gnu.org; Sat, 26 Jan 2013 11:33:52 -0500 Original-Received: by mail-da0-f47.google.com with SMTP id s35so610445dak.20 for <13553@debbugs.gnu.org>; Sat, 26 Jan 2013 08:33:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:from:to:cc:subject:date:mime-version:content-type :content-transfer-encoding:x-mailer:in-reply-to:references :message-id; bh=WWm4RZOfXXdolL0zCivk+AKhC8yjRb1ySOZ9fQXL7r0=; b=Xw7fN66cCDKfs3y8ahcGUwfwq4vcHPEqVPI66QD5bmCnd+Bl9sQpkTWdRHGxLj9Of8 ngs++zRbMSbnaXrWJ3k7GcvYzcXck4XPYNx1FHY2slFVdlBSzohmiHTWhE1mGZTuyDVI LuoQcWzy2zkUNZBjg8KiEUE4Bcmr/ZZEGbM4eA1zpCGq3Crbi0WGBMfBJFoQRlOqlzYI y829MQQts4/Pv7KiOMJ43RSRr+3GtSePBLggV2Zd644GL7ACszDzPldW4Iuexvf/60BT z/wJBL3PHd+Ygb5NLcpU/jh8hSOWVI5ZUuSE1FaJfIslzEhkDRCnUWh8ywOKkUKPal2q +9CA== X-Received: by 10.68.130.225 with SMTP id oh1mr23227022pbb.147.1359218016261; Sat, 26 Jan 2013 08:33:36 -0800 (PST) Original-Received: from gmail.com (115x125x38x6.ap115.ftth.ucom.ne.jp. [115.125.38.6]) by mx.google.com with ESMTPS id pu5sm2804037pbb.73.2013.01.26.08.33.32 (version=TLSv1 cipher=RC4-SHA bits=128/128); Sat, 26 Jan 2013 08:33:34 -0800 (PST) X-Mailer: HidemaruMail 6.00 (WinNT,601) In-Reply-To: <83libgje5t.fsf@gnu.org> 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.x 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:70346 Archived-At: 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 >> 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' ...