about summary refs log tree commit diff
path: root/locale/programs
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2015-08-29 16:37:29 -0400
committerMike Frysinger <vapier@gentoo.org>2015-09-11 23:25:06 -0400
commitb482d0364ed55c171708cd95922a896f002b6043 (patch)
treeee1bc11e0ec6e816671c233c570082e90d979685 /locale/programs
parenta1f99ba28b7b2ed4370b81820f47384d9dae4e36 (diff)
downloadglibc-b482d0364ed55c171708cd95922a896f002b6043.tar.gz
glibc-b482d0364ed55c171708cd95922a896f002b6043.tar.xz
glibc-b482d0364ed55c171708cd95922a896f002b6043.zip
localedef: improve error message [BZ #16985]
If you pass in a path that fails to be opened, then output_path is set to
NULL, and an error is flagged.  Then at the end, we use both of those:
	cannot write output files to `(null)': No such file or directory

Tweak the message to use the user's input when output_path is NULL.
Diffstat (limited to 'locale/programs')
-rw-r--r--locale/programs/localedef.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/locale/programs/localedef.c b/locale/programs/localedef.c
index 2a0f2aa709..06fca12094 100644
--- a/locale/programs/localedef.c
+++ b/locale/programs/localedef.c
@@ -286,7 +286,7 @@ cannot open locale definition file `%s'"), runp->name));
     {
       if (cannot_write_why != 0)
 	WITH_CUR_LOCALE (error (4, cannot_write_why, _("\
-cannot write output files to `%s'"), output_path));
+cannot write output files to `%s'"), output_path ? : argv[remaining]));
       else
 	write_all_categories (locales, charmap, argv[remaining], output_path);
     }