2025-04-04 22:39:25 +02:00
|
|
|
src/tool_parsecfg.c | 15 +++++++++------
|
|
|
|
1 file changed, 9 insertions(+), 6 deletions(-)
|
2024-08-01 22:24:44 +02:00
|
|
|
|
|
|
|
diff --git a/src/tool_parsecfg.c b/src/tool_parsecfg.c
|
2025-04-04 22:39:25 +02:00
|
|
|
index 7a23f35..8338ec7 100644
|
2024-08-01 22:24:44 +02:00
|
|
|
--- a/src/tool_parsecfg.c
|
|
|
|
+++ b/src/tool_parsecfg.c
|
2025-02-14 00:20:21 +01:00
|
|
|
@@ -55,7 +55,7 @@ int parseconfig(const char *filename, struct GlobalConfig *global)
|
2022-06-21 22:03:39 +02:00
|
|
|
|
|
|
|
if(!filename) {
|
|
|
|
/* NULL means load .curlrc from homedir! */
|
|
|
|
- char *curlrc = findfile(".curlrc", CURLRC_DOTSCORE);
|
|
|
|
+ char *curlrc = NULL; /* findfile(".curlrc", CURLRC_DOTSCORE); */
|
|
|
|
if(curlrc) {
|
|
|
|
file = fopen(curlrc, FOPEN_READTEXT);
|
|
|
|
if(!file) {
|
2025-04-04 22:39:25 +02:00
|
|
|
@@ -66,14 +66,17 @@ int parseconfig(const char *filename, struct GlobalConfig *global)
|
2021-06-10 01:50:43 +02:00
|
|
|
}
|
2025-04-04 22:39:25 +02:00
|
|
|
#if defined(_WIN32) && !defined(UNDER_CE)
|
2022-06-21 22:03:39 +02:00
|
|
|
else {
|
|
|
|
- char *fullp;
|
2024-11-12 15:17:57 +01:00
|
|
|
+ TCHAR *fullp;
|
2021-06-10 01:50:43 +02:00
|
|
|
/* check for .curlrc then _curlrc in the dir of the executable */
|
2025-04-04 22:39:25 +02:00
|
|
|
- file = tool_execpath(".curlrc", &fullp);
|
2024-11-12 15:17:57 +01:00
|
|
|
- if(!file)
|
2025-04-04 22:39:25 +02:00
|
|
|
- file = tool_execpath("_curlrc", &fullp);
|
|
|
|
+ file = tool_execpath(TEXT(".curlrc"), &fullp);
|
2022-06-21 22:03:39 +02:00
|
|
|
if(file)
|
2025-04-04 22:39:25 +02:00
|
|
|
/* this is the filename we read from */
|
2022-06-21 22:03:39 +02:00
|
|
|
- filename = fullp;
|
|
|
|
+ filename = ".curlrc";
|
2024-11-12 15:17:57 +01:00
|
|
|
+ else {
|
|
|
|
+ file = Curl_execpath(TEXT("_curlrc"), &fullp);
|
|
|
|
+ if(file)
|
|
|
|
+ filename = "_curlrc";
|
|
|
|
+ }
|
2021-06-10 01:50:43 +02:00
|
|
|
}
|
|
|
|
#endif
|
2022-06-21 22:03:39 +02:00
|
|
|
}
|