From 4553d912b088e2cd774d21195fa57435bd65661b Mon Sep 17 00:00:00 2001 From: Jon Trulson Date: Fri, 3 Aug 2012 17:38:06 -0600 Subject: [PATCH] dtlogin: Fix up Options->Language menu In dtlogin, you can select the language to switch to by selecting it via Options->Language. Unfortunately this was also including '.' and '..', since this list is built dynamically by scanning a directory. Now we screen out '.' and '..'. --- cde/programs/dtlogin/util.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/cde/programs/dtlogin/util.c b/cde/programs/dtlogin/util.c index 0a520323..c93d29bf 100644 --- a/cde/programs/dtlogin/util.c +++ b/cde/programs/dtlogin/util.c @@ -1092,6 +1092,10 @@ ScanNLSDir(char *dirname) { locale = dp->d_name; + if ( (strcmp(dp->d_name, ".") == 0) || + (strcmp(dp->d_name, "..") == 0) ) + continue; + if (locale[0] != '.' && LANGLISTSIZE > (int) (strlen(languageList)+strlen(locale)+2)); { -- 2.25.1