aboutsummaryrefslogtreecommitdiffstats
path: root/src/dired.c
diff options
context:
space:
mode:
authorEli Zaretskii2009-07-13 20:23:46 +0000
committerEli Zaretskii2009-07-13 20:23:46 +0000
commitb604615531c135f482bbcd9e031c2150047e4368 (patch)
treed00031aacb28b06f796a7a96358e8b9bdeec75ee /src/dired.c
parent285712468c1aa1a0ce61dff22a2a874663405c1b (diff)
downloademacs-b604615531c135f482bbcd9e031c2150047e4368.tar.gz
emacs-b604615531c135f482bbcd9e031c2150047e4368.zip
(directory_files_internal) [WINDOWSNT]: Don't make a local copy
of dirfilename.
Diffstat (limited to 'src/dired.c')
-rw-r--r--src/dired.c7
1 files changed, 1 insertions, 6 deletions
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)
219 w32_save = Vw32_get_true_file_attributes; 219 w32_save = Vw32_get_true_file_attributes;
220 if (EQ (Vw32_get_true_file_attributes, Qlocal)) 220 if (EQ (Vw32_get_true_file_attributes, Qlocal))
221 { 221 {
222 char *dirnm = SDATA (dirfilename);
223 char *fn = alloca (SBYTES (dirfilename) + 1);
224
225 strncpy (fn, SDATA (dirfilename), SBYTES (dirfilename));
226 fn[SBYTES (dirfilename)] = '\0';
227 /* w32.c:stat will notice these bindings and avoid calling 222 /* w32.c:stat will notice these bindings and avoid calling
228 GetDriveType for each file. */ 223 GetDriveType for each file. */
229 if (is_slow_fs (fn)) 224 if (is_slow_fs (SDATA (dirfilename)))
230 Vw32_get_true_file_attributes = Qnil; 225 Vw32_get_true_file_attributes = Qnil;
231 else 226 else
232 Vw32_get_true_file_attributes = Qt; 227 Vw32_get_true_file_attributes = Qt;