]> git.ipfire.org Git - thirdparty/util-linux.git/commit
lib/colors: fix fallback to system directory
authorThomas Weißschuh <thomas@t-8ch.de>
Mon, 3 Feb 2025 20:46:13 +0000 (21:46 +0100)
committerThomas Weißschuh <thomas@t-8ch.de>
Mon, 3 Feb 2025 21:10:28 +0000 (22:10 +0100)
commit32098bd38f11dc912cb759fc20151ff6ec453651
tree364e98d84d9b29a8d9f914630f37a666e927830b
parent4dc41fc9508f87b36daa679a8d6a677d24e757a0
lib/colors: fix fallback to system directory

The current check relies on "*sfile" to recognize if a configuration has
been found in the current directory. However this condition is only true
for "type == UL_COLORFILE_SCHEME", breaking the .enable and .disable
configurations.
Instead reorder the logic a bit so that any valid configuration returns
rc == 0.

Reported-by: Axel <axel.scheepers76@gmail.com>
Link: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1094283
Reported-by: Chris Hofstaedtler <zeha@debian.org>
Link: https://lore.kernel.org/util-linux/Z5a08yD10L1J8AIa@per.namespace.at/
Tested-by: Chris Hofstaedtler <zeha@debian.org>
Fixes: 4bdf22803f9a ("lib/colors: ensure fallback to system directory")
Signed-off-by: Thomas Weißschuh <thomas@t-8ch.de>
lib/colors.c