@pmatilai commented on this pull request.


> +#ifdef MACROFILES
+static char *initMacroPath(const char *confdir)
+{
+    return xstrdup(MACROFILES);
+}
+#else
+/*
+ * Prefer XDG_CONFIG_HOME/rpmmacros but fall back to ~/.rpmmacros
+ * if it exists and the XDG path doesn't.
+ */
+static char *initMacroPath(const char *confdir)
+{
+    const char *xdgconf = getenv("XDG_CONFIG_HOME");
+    if (!(xdgconf && *xdgconf))
+       xdgconf = "~/.config";
+    char *dotpath = rpmGetPath(xdgconf, "/rpmmacros", NULL);

It also leaves room for future additions, so why not - will do.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/2992#discussion_r1538660848
You are receiving this because you are subscribed to this thread.

Message ID: <rpm-software-management/rpm/pull/2992/review/1959441...@github.com>
_______________________________________________
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint

Reply via email to