Fossil SCM

On windows, use the global variable _pgmptr instead of <nowiki>argv[0]</nowiki> in order to find the name of the current executable. Ticket [c8c0b78c840e4df9]

drh 2010-10-15 22:41 trunk
Commit 23a3adac3937b26e4df718fda2e11827abc51eaa
1 file changed +1 -1
+1 -1
--- src/winhttp.c
+++ src/winhttp.c
@@ -106,11 +106,11 @@
106106
wanted -= got;
107107
}
108108
fclose(out);
109109
out = 0;
110110
sprintf(zCmd, "\"%s\" http \"%s\" %s %s %s%s",
111
- g.argv[0], g.zRepositoryName, zRequestFName, zReplyFName,
111
+ _pgmptr, g.zRepositoryName, zRequestFName, zReplyFName,
112112
inet_ntoa(p->addr.sin_addr), p->zNotFound
113113
);
114114
portable_system(zCmd);
115115
in = fopen(zReplyFName, "rb");
116116
if( in ){
117117
--- src/winhttp.c
+++ src/winhttp.c
@@ -106,11 +106,11 @@
106 wanted -= got;
107 }
108 fclose(out);
109 out = 0;
110 sprintf(zCmd, "\"%s\" http \"%s\" %s %s %s%s",
111 g.argv[0], g.zRepositoryName, zRequestFName, zReplyFName,
112 inet_ntoa(p->addr.sin_addr), p->zNotFound
113 );
114 portable_system(zCmd);
115 in = fopen(zReplyFName, "rb");
116 if( in ){
117
--- src/winhttp.c
+++ src/winhttp.c
@@ -106,11 +106,11 @@
106 wanted -= got;
107 }
108 fclose(out);
109 out = 0;
110 sprintf(zCmd, "\"%s\" http \"%s\" %s %s %s%s",
111 _pgmptr, g.zRepositoryName, zRequestFName, zReplyFName,
112 inet_ntoa(p->addr.sin_addr), p->zNotFound
113 );
114 portable_system(zCmd);
115 in = fopen(zReplyFName, "rb");
116 if( in ){
117

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button