locale-setup: do not load locale from environemnt when /etc/locale.conf is unchanged

Previously, when /etc/locale.conf is unchanged, locales were loaded from
possibly outdated environment variable.

Fixes a bug introduced by 018befcff6 (v253).
Fixes #35717.
This commit is contained in:
Yu Watanabe
2024-12-28 15:07:31 +09:00
committed by Luca Boccassi
parent 51a0a3b049
commit 80797bbb91

View File

@@ -75,7 +75,7 @@ static int locale_context_load_conf(LocaleContext *c, LocaleLoadFlag flag) {
/* If the file is not changed, then we do not need to re-read the file. */
if (stat_inode_unmodified(&c->st, &st))
return 0;
return 1; /* (already) loaded */
c->st = st;
locale_context_clear(c);