aboutsummaryrefslogtreecommitdiff
path: root/locale
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2000-07-07 07:12:11 +0000
committerUlrich Drepper <drepper@redhat.com>2000-07-07 07:12:11 +0000
commit89a4f6ff1f643aadc4d3e9e401d792b5198d9f52 (patch)
tree5ccbe38b3c719ba403fdebac6f2dc8761e698405 /locale
parent2528edd3176df331320f366ff3dad88cb6d82533 (diff)
downloadglibc-89a4f6ff1f643aadc4d3e9e401d792b5198d9f52.tar
glibc-89a4f6ff1f643aadc4d3e9e401d792b5198d9f52.tar.gz
glibc-89a4f6ff1f643aadc4d3e9e401d792b5198d9f52.tar.bz2
glibc-89a4f6ff1f643aadc4d3e9e401d792b5198d9f52.zip
Update.
2000-07-07 Ulrich Drepper <drepper@redhat.com> * locale/programs/locale.c (write_locales): Don't simply add all directories found in the subdir, test whether at least the LC_CTYPE file is in there.
Diffstat (limited to 'locale')
-rw-r--r--locale/programs/locale.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/locale/programs/locale.c b/locale/programs/locale.c
index 0fcc2599e1..c37dad8649 100644
--- a/locale/programs/locale.c
+++ b/locale/programs/locale.c
@@ -336,7 +336,20 @@ write_locales (void)
}
if (S_ISDIR (mode))
- PUT (strdup (dirent->d_name));
+ {
+ /* Test whether at least the LC_CTYPE data is there. Some
+ directories only contain translations. */
+ char buf[sizeof (LOCALEDIR) + strlen (dirent->d_name)
+ + sizeof "/LC_CTYPE"];
+ struct stat st;
+
+ stpcpy (stpcpy (stpcpy (stpcpy (buf, LOCALEDIR), "/"),
+ dirent->d_name),
+ "/LC_CTYPE");
+
+ if (stat (buf, &st) == 0 && S_ISREG (st.st_mode))
+ PUT (strdup (dirent->d_name));
+ }
}
closedir (dir);