From: Yu Watanabe Date: Sat, 28 Dec 2024 06:07:31 +0000 (+0900) Subject: locale-setup: do not load locale from environemnt when /etc/locale.conf is unchanged X-Git-Tag: v258-rc1~1767 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=80797bbb919b3ccde4e51b349f3ca70c1157053e;p=thirdparty%2Fsystemd.git 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 018befcff6b51f8a50ca232e1984d34526037241 (v253). Fixes #35717. --- diff --git a/src/shared/locale-setup.c b/src/shared/locale-setup.c index 4e7f486a237..5c4580cffff 100644 --- a/src/shared/locale-setup.c +++ b/src/shared/locale-setup.c @@ -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);