aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorKarl Heuer1994-09-05 01:12:25 +0000
committerKarl Heuer1994-09-05 01:12:25 +0000
commitd26859ebed557746e8b8ba517349b14cba840540 (patch)
tree33afc1766e8948e4eff3120fb976451279271172 /src
parent76425a494dc67eabdc32a56c8002250981537b29 (diff)
downloademacs-d26859ebed557746e8b8ba517349b14cba840540.tar.gz
emacs-d26859ebed557746e8b8ba517349b14cba840540.zip
(Ffile_accessible_directory_p): Put back the gcpro.
Diffstat (limited to 'src')
-rw-r--r--src/fileio.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/fileio.c b/src/fileio.c
index 4a1fe76bdd1..1654d350ca2 100644
--- a/src/fileio.c
+++ b/src/fileio.c
@@ -2383,6 +2383,7 @@ searchable directory.")
2383{ 2383{
2384 Lisp_Object handler; 2384 Lisp_Object handler;
2385 int tem; 2385 int tem;
2386 struct gcpro gcpro1;
2386 2387
2387 /* If the file name has special constructs in it, 2388 /* If the file name has special constructs in it,
2388 call the corresponding file handler. */ 2389 call the corresponding file handler. */
@@ -2390,10 +2391,16 @@ searchable directory.")
2390 if (!NILP (handler)) 2391 if (!NILP (handler))
2391 return call2 (handler, Qfile_accessible_directory_p, filename); 2392 return call2 (handler, Qfile_accessible_directory_p, filename);
2392 2393
2393 /* Need to gcpro in case the first function call has a handler that 2394 /* It's an unlikely combination, but yes we really do need to gcpro:
2394 causes filename to be relocated. */ 2395 Suppose that file-accessible-directory-p has no handler, but
2396 file-directory-p does have a handler; this handler causes a GC which
2397 relocates the string in `filename'; and finally file-directory-p
2398 returns non-nil. Then we would end up passing a garbaged string
2399 to file-executable-p. */
2400 GCPRO1 (filename);
2395 tem = (NILP (Ffile_directory_p (filename)) 2401 tem = (NILP (Ffile_directory_p (filename))
2396 || NILP (Ffile_executable_p (filename))); 2402 || NILP (Ffile_executable_p (filename)));
2403 UNGCPRO;
2397 return tem ? Qnil : Qt; 2404 return tem ? Qnil : Qt;
2398} 2405}
2399 2406