@dmnks 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);
+1 for the above path, too. It's also more conventional, as it seems.
--
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/2992#discussion_r1537906333
You are receiving this because you are subscribed to this thread.
Message ID: <rpm-software-management/rpm/pull/2992/review/1958260...@github.com>
_______________________________________________
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint