]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
localedef: Handle symbolic links when generating locale-archive
authorArjun Shankar <arjun@redhat.com>
Thu, 24 Feb 2022 20:43:09 +0000 (21:43 +0100)
committerArjun Shankar <arjun@redhat.com>
Thu, 24 Feb 2022 21:45:05 +0000 (22:45 +0100)
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>
locale/programs/locarchive.c

index 45408c26c169ff05071345e515dd2be155a928b4..eeb2fa6ffecd1dba1a31e3712999efb799df90be 100644 (file)
@@ -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);