GNU bug report logs -
#18891
Doesn't handle pwd = /C: very well
Previous Next
Reported by: Glenn Morris <rgm <at> gnu.org>
Date: Wed, 29 Oct 2014 20:04:01 UTC
Severity: minor
Found in version 24.4
Fixed in version 24.5
Done: Michael Albinus <michael.albinus <at> gmx.de>
Bug is archived. No further changes may be made.
Full log
Message #90 received at 18891 <at> debbugs.gnu.org (full text, mbox):
Eli Zaretskii <eliz <at> gnu.org> writes:
> Your change calls Ffile_accessible_directory_p, Fstring_match, and
> Fsubstring with a unibyte (encoded) string as their argument. I think
> we should avoid that, as, e.g., Fstring_match might yield a false
> positive under some encodings.
Shall I change it like this?
--8<---------------cut here---------------start------------->8---
*** /usr/local/src/emacs-24/src/callproc.c.~117680~ 2014-11-07 17:54:37.318055813 +0100
--- /usr/local/src/emacs-24/src/callproc.c 2014-11-07 17:54:03.865559094 +0100
***************
*** 150,157 ****
dir = expand_and_dir_to_file (dir, Qnil);
- if (STRING_MULTIBYTE (dir))
- dir = ENCODE_FILE (dir);
if (NILP (Ffile_accessible_directory_p (dir)))
report_file_error ("Setting current directory",
BVAR (current_buffer, directory));
--- 150,155 ----
***************
*** 160,165 ****
--- 158,166 ----
if (Fstring_match (build_string ("^/:"), dir, Qnil))
dir = Fsubstring (dir, make_number (2), Qnil);
+ if (STRING_MULTIBYTE (dir))
+ dir = ENCODE_FILE (dir);
+
RETURN_UNGCPRO (dir);
}
--8<---------------cut here---------------end--------------->8---
Best regards, Michael.
This bug report was last modified 10 years and 193 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.