in the findfile() function */
static const struct finder conf_list[] = {
{ "CURL_HOME", NULL, FALSE },
- { "XDG_CONFIG_HOME", NULL, FALSE }, /* index == 1, used in the code */
+ { "XDG_CONFIG_HOME", NULL, TRUE },
{ "HOME", NULL, FALSE },
#ifdef _WIN32
{ "USERPROFILE", NULL, FALSE },
char *findfile(const char *fname, int dotscore)
{
int i;
- bool xdg = FALSE;
DEBUGASSERT(fname && fname[0]);
DEBUGASSERT((dotscore != 1) || (fname[0] == '.'));
if(home) {
char *path;
const char *filename = fname;
- if(i == 1 /* XDG_CONFIG_HOME */)
- xdg = TRUE;
if(!home[0]) {
curl_free(home);
continue;
home = c;
}
if(conf_list[i].withoutdot) {
- if(!dotscore || xdg) {
+ if(!dotscore) {
/* this is not looking for .curlrc, or the XDG_CONFIG_HOME was
defined so we skip the extended check */
curl_free(home);
#
# Client-side
<client>
-<file1 name="%LOGDIR/.curlrc">
+<file1 name="%LOGDIR/curlrc">
--next
header = "a: a"
data = "curlrc read"
CURL_HOME=
</setenv>
<name>
-Verify XDG_CONFIG_HOME use to find .curlrc
+Verify XDG_CONFIG_HOME use to find curlrc
</name>
<command option="no-q">
%HOSTIP:%HTTPPORT/%TESTNUMBER