[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [MD:2776]NTEmacsen crashed, when expand-file-name.

From: 白井秀行
Subject: Re: [MD:2776]NTEmacsen crashed, when expand-file-name.
Date: Thu, 13 Dec 2001 11:40:12 +0900 (JST)

From: KOSEKI Yoshinori <address@hidden> said
Subject: [MD:2776]NTEmacsen crashed, when expand-file-name.
Message-ID: <address@hidden>
Date: Wed, 12 Dec 2001 19:52:10 +0900

kose> Using NTEmacs20.7, NTEmacs21.1.50(CVS chckout today) and
kose> Meadow1.14(Emacs20.7).

kose> This Emacsen crashed, when eval this elisp code.

kose> (let (default-directory)
kose>   (expand-file-name "a"))

I guess this crash,

step.1 Execute above elisp code on Windows.
step.2 Set default_directory = build_string ("/");
step.3 (find-file-name-handler "/" 'expand_file_name)
       => ange-ftp-completion-hook-function
step.4 ange-ftp-completion-hook-function() calls expand-file-name("/")
step.5 Set default_directory = build_string ("/");
step.6 But "/" is not rootdirectory in DOS_NT.
step.7 Excecute default_directory = Fexpand_file_name (default_directory, Qnil);
step.8 Excecute step.7 to infinitely.

I think important point 'step.5' to solve this infinity loop;
Set the value like "c:/" to default_directory when
default_directory is not string on Windows.

Best Regards,

Hideyuki SHIRAI (mailto:address@hidden)

2001-12-13  Hideyuki SHIRAI  <address@hidden>

        * fileio.c (Fexpand_file_name)  [DOS_NT]: If default dir
        isn't string, use the top directory of `Vdata_directory'.

--- fileio.c.orig       Thu Dec 13 11:24:14 2001
+++ fileio.c    Thu Dec 13 11:23:38 2001
@@ -1038,7 +1038,11 @@
   if (NILP (default_directory))
     default_directory = current_buffer->directory;
   if (! STRINGP (default_directory))
+#ifdef DOS_NT
+    default_directory = Fsubstring (Vdata_directory, make_number (0), 
make_number (3));
     default_directory = build_string ("/");
   if (!NILP (default_directory))

reply via email to

[Prev in Thread] Current Thread [Next in Thread]