summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArjun Shankar <arjun@redhat.com>2022-02-24 21:43:09 +0100
committerAndreas K. Hüttel <dilfridge@gentoo.org>2022-03-06 15:59:26 +0100
commite66e0a730911cc2c5c9b6cf9f46384389be58ca1 (patch)
tree4c27f4499e2f805447b9065b8e351dbc53f4b3b0
parentlocaledata: Do not generate output if warnings were present. (diff)
downloadglibc-e66e0a730911cc2c5c9b6cf9f46384389be58ca1.tar.gz
glibc-e66e0a730911cc2c5c9b6cf9f46384389be58ca1.tar.bz2
glibc-e66e0a730911cc2c5c9b6cf9f46384389be58ca1.zip
localedef: Handle symbolic links when generating locale-archive
Whenever locale data for any locale included symbolic links, localedef would throw the error "incomplete set of locale files" and exclude it from the generated locale archive. This commit fixes that. Co-authored-by: Florian Weimer <fweimer@redhat.com> Reviewed-by: Carlos O'Donell <carlos@redhat.com> (cherry picked from commit ea89d5bbd9e5e514b606045d909e6ab87d851c88) (cherry picked from commit 90797f49722b69818780b1111c0ecc9dbbbf0bdf)
-rw-r--r--locale/programs/locarchive.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/locale/programs/locarchive.c b/locale/programs/locarchive.c
index 45408c26c1..eeb2fa6ffe 100644
--- a/locale/programs/locarchive.c
+++ b/locale/programs/locarchive.c
@@ -1397,7 +1397,7 @@ add_locales_to_archive (size_t nlist, char *list[], bool replace)
{
char fullname[fnamelen + 2 * strlen (d->d_name) + 7];
- if (d_type == DT_UNKNOWN)
+ if (d_type == DT_UNKNOWN || d_type == DT_LNK)
{
strcpy (stpcpy (stpcpy (fullname, fname), "/"),
d->d_name);