about summary refs log tree commit diff
path: root/locale/programs
diff options
context:
space:
mode:
authorArjun Shankar <arjun@redhat.com>2022-02-24 21:43:09 +0100
committerArjun Shankar <arjun@redhat.com>2022-02-24 22:45:05 +0100
commitea89d5bbd9e5e514b606045d909e6ab87d851c88 (patch)
tree517a0a057ba92ca24c725a76cf0e796cc5aa8968 /locale/programs
parent89377d41d73b59a5b8c781fe08df99df0a470fac (diff)
downloadglibc-ea89d5bbd9e5e514b606045d909e6ab87d851c88.tar.gz
glibc-ea89d5bbd9e5e514b606045d909e6ab87d851c88.tar.xz
glibc-ea89d5bbd9e5e514b606045d909e6ab87d851c88.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>
Diffstat (limited to 'locale/programs')
-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);