[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] master 169d04b: Fix initialization of shared-game-score-di
From: |
Eli Zaretskii |
Subject: |
[Emacs-diffs] master 169d04b: Fix initialization of shared-game-score-directory on MS-Windows |
Date: |
Mon, 16 Sep 2019 10:53:08 -0400 (EDT) |
branch: master
commit 169d04b8ac416c71a8b89a9c4a975d0f014265e0
Author: Eli Zaretskii <address@hidden>
Commit: Eli Zaretskii <address@hidden>
Fix initialization of shared-game-score-directory on MS-Windows
* src/callproc.c (init_callproc) [WINDOWSNT]: Run PATH_GAME
through w32_relocate, to expand %emacs_dir%.
[DOS_NT]: Accept EACCES as not "unusual" errno value.
Reported by Richard Copley <address@hidden>.
---
src/callproc.c | 15 +++++++++++++--
1 file changed, 13 insertions(+), 2 deletions(-)
diff --git a/src/callproc.c b/src/callproc.c
index 20e0bc5..1ac0bdc 100644
--- a/src/callproc.c
+++ b/src/callproc.c
@@ -1595,10 +1595,21 @@ init_callproc (void)
Lisp_Object gamedir = Qnil;
if (PATH_GAME)
{
- Lisp_Object path_game = build_unibyte_string (PATH_GAME);
+ const char *cpath_game = PATH_GAME;
+#ifdef WINDOWSNT
+ /* On MS-Windows, PATH_GAME normally starts with a literal
+ "%emacs_dir%", so it will never work without some tweaking. */
+ cpath_game = w32_relocate (cpath_game);
+#endif
+ Lisp_Object path_game = build_unibyte_string (cpath_game);
if (file_accessible_directory_p (path_game))
gamedir = path_game;
- else if (errno != ENOENT && errno != ENOTDIR)
+ else if (errno != ENOENT && errno != ENOTDIR
+#ifdef DOS_NT
+ /* DOS/Windows sometimes return EACCES for bad file names */
+ && errno != EACCES
+#endif
+ )
dir_warning ("game dir", path_game);
}
Vshared_game_score_directory = gamedir;
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] master 169d04b: Fix initialization of shared-game-score-directory on MS-Windows,
Eli Zaretskii <=