|
From: | Juanma Barranquero |
Subject: | Re: [Emacs-diffs] master de3daf0: Improve directory-access diagnostics |
Date: | Mon, 16 Sep 2019 13:45:35 +0200 |
branch: master
commit de3daf063987dfc2a28cd5071b8f77446c7312e0
Author: Paul Eggert <address@hidden>
Commit: Paul Eggert <address@hidden>
Improve directory-access diagnostics
* src/callproc.c (init_callproc): Diagnose I/O errors,
access errors, etc. for the game directory.
* src/charset.c (init_charset): Improve quality of diagnostic
when the charsets directory has I/O errors, access errors, etc.
---
src/callproc.c | 2 ++
src/charset.c | 20 ++++++++++++--------
2 files changed, 14 insertions(+), 8 deletions(-)
diff --git a/src/callproc.c b/src/callproc.c
index 4473b19..20e0bc5 100644
--- a/src/callproc.c
+++ b/src/callproc.c
@@ -1598,6 +1598,8 @@ init_callproc (void)
Lisp_Object path_game = build_unibyte_string (PATH_GAME);
if (file_accessible_directory_p (path_game))
gamedir = path_game;
+ else if (errno != ENOENT && errno != ENOTDIR)
+ dir_warning ("game dir", path_game);
}
Vshared_game_score_directory = gamedir;
}
diff --git a/src/charset.c b/src/charset.c
index 8c54381..93206aa 100644
--- a/src/charset.c
+++ b/src/charset.c
@@ -2292,14 +2292,18 @@ init_charset (void)
{
/* This used to be non-fatal (dir_warning), but it should not
happen, and if it does sooner or later it will cause some
- obscure problem (eg bug#6401), so better abort. */
- fprintf (stderr, "Error: charsets directory not found:\n\
-%s\n\
-Emacs will not function correctly without the character map files.\n%s\
-Please check your installation!\n",
- SDATA (tempdir),
- egetenv("EMACSDATA") ? "The EMACSDATA environment \
-variable is set, maybe it has the wrong value?\n" : "");
+ obscure problem (eg bug#6401), so better exit. */
+ fprintf (stderr,
+ ("Error: %s: %s\n"
+ "Emacs will not function correctly "
+ "without the character map files.\n"
+ "%s"
+ "Please check your installation!\n"),
+ SDATA (tempdir), strerror (errno),
+ (egetenv ("EMACSDATA")
+ ? ("The EMACSDATA environment variable is set. "
+ "Maybe it has the wrong value?\n")
+ : ""));
exit (1);
}
_______________________________________________
Emacs-diffs mailing list
address@hidden
https://lists.gnu.org/mailman/listinfo/emacs-diffs
[Prev in Thread] | Current Thread | [Next in Thread] |