summaryrefslogtreecommitdiff
path: root/src/callproc.c
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2019-09-18 03:06:10 -0700
committerPaul Eggert <eggert@cs.ucla.edu>2019-09-18 03:06:49 -0700
commit94ca934a5c4ef4908fdb7bcd78950bacf9c4ce88 (patch)
tree2da3d0da35162d50632e3cd4d6382213444cb2ca /src/callproc.c
parent9dc306b1db08196684d05a474148e16305adbad0 (diff)
downloademacs-94ca934a5c4ef4908fdb7bcd78950bacf9c4ce88.tar.gz
Fix permission-denied issue in MS-Windows startup
* src/callproc.c (init_callproc): Use file_access_p rather than Ffile_exists_p during startup (Bug#37445).
Diffstat (limited to 'src/callproc.c')
-rw-r--r--src/callproc.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/callproc.c b/src/callproc.c
index 1ac0bdc710a..dbbf15c792a 100644
--- a/src/callproc.c
+++ b/src/callproc.c
@@ -1560,20 +1560,19 @@ init_callproc (void)
source directory. */
if (data_dir == 0)
{
- Lisp_Object tem, tem1, srcdir;
+ Lisp_Object tem, srcdir;
Lisp_Object lispdir = Fcar (decode_env_path (0, PATH_DUMPLOADSEARCH, 0));
srcdir = Fexpand_file_name (build_string ("../src/"), lispdir);
tem = Fexpand_file_name (build_string ("NEWS"), Vdata_directory);
- tem1 = Ffile_exists_p (tem);
- if (!NILP (Fequal (srcdir, Vinvocation_directory)) || NILP (tem1))
+ if (!NILP (Fequal (srcdir, Vinvocation_directory))
+ || !file_access_p (SSDATA (tem), F_OK))
{
Lisp_Object newdir;
newdir = Fexpand_file_name (build_string ("../etc/"), lispdir);
tem = Fexpand_file_name (build_string ("NEWS"), newdir);
- tem1 = Ffile_exists_p (tem);
- if (!NILP (tem1))
+ if (file_access_p (SSDATA (tem), F_OK))
Vdata_directory = newdir;
}
}