From: Mike Yuan Date: Mon, 2 Feb 2026 09:50:40 +0000 (+0100) Subject: portable-util: drop spurious -ENXIO check for xdg_user_config_dir() X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7dc7cc02fb40e50f63a63451a27c75e7ea8bf1d5;p=thirdparty%2Fsystemd.git portable-util: drop spurious -ENXIO check for xdg_user_config_dir() Unlike $XDG_RUNTIME_DIR the user config dir has a default value, hence -ENXIO is not really expected. --- diff --git a/src/shared/portable-util.c b/src/shared/portable-util.c index 078d311dda6..d2c03aecb91 100644 --- a/src/shared/portable-util.c +++ b/src/shared/portable-util.c @@ -29,13 +29,12 @@ int portable_profile_dirs(RuntimeScope scope, char ***ret) { _cleanup_free_ char *d = NULL; r = xdg_user_config_dir("systemd/portable/profile", &d); - if (r < 0 && r != -ENXIO) + if (r < 0) + return r; + + r = strv_consume(&dirs, TAKE_PTR(d)); + if (r < 0) return r; - if (r >= 0) { - r = strv_consume(&dirs, TAKE_PTR(d)); - if (r < 0) - return r; - } r = xdg_user_runtime_dir("systemd/portable/profile", &d); if (r < 0 && r != -ENXIO)