From 764e4f066d5719e68fa0d6b0b0d9efa0625c5c15 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Sun, 2 Jan 2022 22:23:34 +0100 Subject: tool_findfile: check ~/.config/curlrc too ... after the initial checks for .curlrc and if XDG_CONFIG_HOME is not set, use $HOME and $CURL_HOME to check if ~/.config/curlrc is present. Add test 436 to verify Reported-by: Sandro Jaeckel Fixes #8208 Closes #8213 --- src/tool_findfile.h | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'src/tool_findfile.h') diff --git a/src/tool_findfile.h b/src/tool_findfile.h index 0f6a8eb55..412390867 100644 --- a/src/tool_findfile.h +++ b/src/tool_findfile.h @@ -7,7 +7,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2021, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2022, Daniel Stenberg, , et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -23,6 +23,12 @@ ***************************************************************************/ #include "tool_setup.h" -char *findfile(const char *fname, bool dotscore); +#ifdef WIN32 +#define CURLRC_DOTSCORE 2 /* look for underscore-prefixed name too */ +#else +#define CURLRC_DOTSCORE 1 /* regular .curlrc check */ +#endif + +char *findfile(const char *fname, int dotscore); #endif /* HEADER_CURL_TOOL_HOMEDIR_H */ -- cgit v1.2.1