aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/callproc.c15
1 files changed, 13 insertions, 2 deletions
diff --git a/src/callproc.c b/src/callproc.c
index 20e0bc50dab..1ac0bdc710a 100644
--- a/src/callproc.c
+++ b/src/callproc.c
@@ -1595,10 +1595,21 @@ init_callproc (void)
1595 Lisp_Object gamedir = Qnil; 1595 Lisp_Object gamedir = Qnil;
1596 if (PATH_GAME) 1596 if (PATH_GAME)
1597 { 1597 {
1598 Lisp_Object path_game = build_unibyte_string (PATH_GAME); 1598 const char *cpath_game = PATH_GAME;
1599#ifdef WINDOWSNT
1600 /* On MS-Windows, PATH_GAME normally starts with a literal
1601 "%emacs_dir%", so it will never work without some tweaking. */
1602 cpath_game = w32_relocate (cpath_game);
1603#endif
1604 Lisp_Object path_game = build_unibyte_string (cpath_game);
1599 if (file_accessible_directory_p (path_game)) 1605 if (file_accessible_directory_p (path_game))
1600 gamedir = path_game; 1606 gamedir = path_game;
1601 else if (errno != ENOENT && errno != ENOTDIR) 1607 else if (errno != ENOENT && errno != ENOTDIR
1608#ifdef DOS_NT
1609 /* DOS/Windows sometimes return EACCES for bad file names */
1610 && errno != EACCES
1611#endif
1612 )
1602 dir_warning ("game dir", path_game); 1613 dir_warning ("game dir", path_game);
1603 } 1614 }
1604 Vshared_game_score_directory = gamedir; 1615 Vshared_game_score_directory = gamedir;