From: Eli Zaretskii Date: Mon, 13 Jul 2009 20:23:46 +0000 (+0000) Subject: (directory_files_internal) [WINDOWSNT]: Don't make a local copy X-Git-Tag: emacs-pretest-23.1.90~2187 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=b604615531c135f482bbcd9e031c2150047e4368;p=emacs.git (directory_files_internal) [WINDOWSNT]: Don't make a local copy of dirfilename. --- diff --git a/src/ChangeLog b/src/ChangeLog index 8a92061d83a..cedf1066e61 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2009-07-13 Eli Zaretskii + + * dired.c (directory_files_internal) [WINDOWSNT]: Don't make a + local copy of dirfilename. + 2009-07-13 Kenichi Handa * chartab.c (sub_char_table_ref_and_range): Fix the range check diff --git a/src/dired.c b/src/dired.c index 2d2f196c8ff..b71f12ff846 100644 --- a/src/dired.c +++ b/src/dired.c @@ -219,14 +219,9 @@ directory_files_internal (directory, full, match, nosort, attrs, id_format) w32_save = Vw32_get_true_file_attributes; if (EQ (Vw32_get_true_file_attributes, Qlocal)) { - char *dirnm = SDATA (dirfilename); - char *fn = alloca (SBYTES (dirfilename) + 1); - - strncpy (fn, SDATA (dirfilename), SBYTES (dirfilename)); - fn[SBYTES (dirfilename)] = '\0'; /* w32.c:stat will notice these bindings and avoid calling GetDriveType for each file. */ - if (is_slow_fs (fn)) + if (is_slow_fs (SDATA (dirfilename))) Vw32_get_true_file_attributes = Qnil; else Vw32_get_true_file_attributes = Qt;