From: Stefan Monnier Date: Wed, 12 Oct 2011 19:08:04 +0000 (-0400) Subject: * doc.c (get_doc_string): Encode file name. X-Git-Tag: emacs-pretest-24.0.91~137 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=8fe012c4e6070eb23a864b8f8006849b6e41e2b7;p=emacs.git * doc.c (get_doc_string): Encode file name. Fixes: debbugs:9735 --- diff --git a/src/ChangeLog b/src/ChangeLog index 0d1faa3ba2f..94664833b9b 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,7 @@ +2011-10-12 Stefan Monnier + + * doc.c (get_doc_string): Encode file name (bug#9735). + 2011-10-12 Eli Zaretskii * bidi.c (bidi_level_of_next_char): diff --git a/src/doc.c b/src/doc.c index 83e943c42b8..80aaba9f7b2 100644 --- a/src/doc.c +++ b/src/doc.c @@ -116,14 +116,16 @@ get_doc_string (Lisp_Object filepos, int unibyte, int definition) If it is relative, combine it with Vdoc_directory. */ tem = Ffile_name_absolute_p (file); + file = ENCODE_FILE (file); if (NILP (tem)) { - minsize = SCHARS (Vdoc_directory); + Lisp_Object docdir = ENCODE_FILE (Vdoc_directory); + minsize = SCHARS (docdir); /* sizeof ("../etc/") == 8 */ if (minsize < 8) minsize = 8; name = (char *) alloca (minsize + SCHARS (file) + 8); - strcpy (name, SSDATA (Vdoc_directory)); + strcpy (name, SSDATA (docdir)); strcat (name, SSDATA (file)); } else @@ -138,7 +140,7 @@ get_doc_string (Lisp_Object filepos, int unibyte, int definition) if (!NILP (Vpurify_flag)) { /* Preparing to dump; DOC file is probably not installed. - So check in ../etc. */ + So check in ../etc. */ strcpy (name, "../etc/"); strcat (name, SSDATA (file));