summaryrefslogtreecommitdiff
path: root/src/tool_findfile.h
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2022-01-02 22:23:34 +0100
committerDaniel Stenberg <daniel@haxx.se>2022-01-07 10:10:49 +0100
commit764e4f066d5719e68fa0d6b0b0d9efa0625c5c15 (patch)
tree6c45cdf13860514699deed9f95f14dec2a164389 /src/tool_findfile.h
parent4432234acaad3ecaf852b4c8a69c8fccc94ec512 (diff)
downloadcurl-764e4f066d5719e68fa0d6b0b0d9efa0625c5c15.tar.gz
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
Diffstat (limited to 'src/tool_findfile.h')
-rw-r--r--src/tool_findfile.h10
1 files changed, 8 insertions, 2 deletions
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, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2022, Daniel Stenberg, <daniel@haxx.se>, 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 */