]> git.ipfire.org Git - thirdparty/sqlite.git/commitdiff
CLI arg handling robustness improvements. sqlite3-rsync
authorstephan <stephan@noemail.net>
Sat, 14 Sep 2024 16:30:01 +0000 (16:30 +0000)
committerstephan <stephan@noemail.net>
Sat, 14 Sep 2024 16:30:01 +0000 (16:30 +0000)
FossilOrigin-Name: 129aca54f6b791c222b51f3eb01569e1e569269860e153b005140eb65af378b9

manifest
manifest.uuid
tool/sqlite3-rsync.c

index 119071b4bc98846a2d026b555ea50ab6698a755f..3ab3bc26c9c940ecacac1202854513142c6bbbc9 100644 (file)
--- a/manifest
+++ b/manifest
@@ -1,5 +1,5 @@
-C Add\sthe\s--version\soption.
-D 2024-09-14T16:28:38.248
+C CLI\sarg\shandling\srobustness\simprovements.
+D 2024-09-14T16:30:01.739
 F .fossil-settings/empty-dirs dbb81e8fc0401ac46a1491ab34a7f2c7c0452f2f06b54ebb845d024ca8283ef1
 F .fossil-settings/ignore-glob 35175cdfcf539b2318cb04a9901442804be81cd677d8b889fcc9149c21f239ea
 F LICENSE.md df5091916dbb40e6e9686186587125e1b2ff51f022cc334e886c19a0e9982724
@@ -2174,7 +2174,7 @@ F tool/speedtest8inst1.c 7ce07da76b5e745783e703a834417d725b7d45fd
 F tool/spellsift.tcl 52b4b04dc4333c7ab024f09d9d66ed6b6f7c6eb00b38497a09f338fa55d40618 x
 F tool/split-sqlite3c.tcl 5aa60643afca558bc732b1444ae81a522326f91e1dc5665b369c54f09e20de60
 F tool/sqldiff.c 847fc8fcfddf5ce4797b7394cad6372f2f5dc17d8186e2ef8fb44d50fae4f44a
-F tool/sqlite3-rsync.c f34c43d88141dff62fb83067059bca9ec79d85fbc5be92bfe0d95db95ce21107
+F tool/sqlite3-rsync.c 00c9b4483851ca0337dff4b544ee39dffa8cdbe9dc55cd51d391590fd1f03763
 F tool/sqlite3_analyzer.c.in 8da2b08f56eeac331a715036cf707cc20f879f231362be0c22efd682e2b89b4f
 F tool/sqltclsh.c.in 1bcc2e9da58fadf17b0bf6a50e68c1159e602ce057210b655d50bad5aaaef898
 F tool/sqltclsh.tcl 862f4cf1418df5e1315b5db3b5ebe88969e2a784525af5fbf9596592f14ed848
@@ -2213,8 +2213,8 @@ F vsixtest/vsixtest.tcl 6195aba1f12a5e10efc2b8c0009532167be5e301abe5b31385638080
 F vsixtest/vsixtest.vcxproj.data 2ed517e100c66dc455b492e1a33350c1b20fbcdc
 F vsixtest/vsixtest.vcxproj.filters 37e51ffedcdb064aad6ff33b6148725226cd608e
 F vsixtest/vsixtest_TemporaryKey.pfx e5b1b036facdb453873e7084e1cae9102ccc67a0
-P 2d8cd76691554578e987ce682cf0c42c083711dd1511a178148978182ef43ba2
-R 599973ba253a67fa628460fcbcaa6551
-U drh
-Z 274e3943ab699374e1863c8c0827d301
+P 9961334c8007e7cb6ae55885075b74acddc4fa701b359cf67e0f3c237d7eba4a
+R 88be3363ce7bdb6c2bdb93ef027d46e9
+U stephan
+Z 5b00ba151c4dd893eaaa646fc9f450ae
 # Remove this line to create a well-formed Fossil manifest.
index 35f0a7c5ec186f82f55b57d63069d33877d68932..29148a35ba68eb201028d4522f7ad76b042caaf3 100644 (file)
@@ -1 +1 @@
-9961334c8007e7cb6ae55885075b74acddc4fa701b359cf67e0f3c237d7eba4a
+129aca54f6b791c222b51f3eb01569e1e569269860e153b005140eb65af378b9
index 2a58125aa0e50c06fc2a4098a9f41629dbfeeb2f..237ff8df5aa3236af5493b39a26474db6a63d020 100644 (file)
@@ -1629,8 +1629,9 @@ int main(int argc, char const * const *argv){
     if( strcmp(z, "--logfile")==0 ){
       /* DEBUG OPTION:  --logfile FILENAME
       ** Cause all local output traffic to be duplicated in FILENAME */
+      const char *zLog = cli_opt_val;
       if( ctx.pLog ) fclose(ctx.pLog);
-      ctx.pLog = fopen(argv[++i],"wb");
+      ctx.pLog = fopen(zLog, "wb");
       if( ctx.pLog==0 ){
         fprintf(stderr, "cannot open \"%s\" for writing\n", argv[i]);
         return 1;
@@ -1640,14 +1641,14 @@ int main(int argc, char const * const *argv){
     if( strcmp(z, "--errorfile")==0 ){
       /* DEBUG OPTION:  --errorfile FILENAME
       ** Error messages on the local side are written into FILENAME */
-      ctx.zErrFile = argv[++i];
+      ctx.zErrFile = cli_opt_val;
       continue;
     }
     if( strcmp(z, "--remote-errorfile")==0 ){
       /* DEBUG OPTION:  --remote-errorfile FILENAME
       ** Error messages on the remote side are written into FILENAME on
       ** the remote side. */
-      zRemoteErrFile = argv[++i];
+      zRemoteErrFile = cli_opt_val;
       continue;
     }
     if( strcmp(z, "-help")==0 || strcmp(z, "--help")==0