In the CLI, do not translate unquoted backslash escapes on dot-commands

as that can damage filename arguments.

FossilOrigin-Name: 4a0e2c6e17eefb296b7e91a13305b2260d6eb869a37bc5e5b79edaf3c19c810a
This commit is contained in:
drh 2023-10-21 22:31:00 +00:00
parent d2c737f2e4
commit 06f4dc7edb
3 changed files with 9 additions and 7 deletions

View File

@ -1,5 +1,5 @@
C Remove\sa\sbranch\sthat\scannot\saffect\sthe\soutcome\sfrom\sFkNoAction\sprocessing\sin\nfkey.c.\s\sReplace\sit\swith\san\sassert().
D 2023-10-21T20:34:57.969
C In\sthe\sCLI,\sdo\snot\stranslate\sunquoted\sbackslash\sescapes\son\sdot-commands\nas\sthat\scan\sdamage\sfilename\sarguments.
D 2023-10-21T22:31:00.353
F .fossil-settings/empty-dirs dbb81e8fc0401ac46a1491ab34a7f2c7c0452f2f06b54ebb845d024ca8283ef1
F .fossil-settings/ignore-glob 35175cdfcf539b2318cb04a9901442804be81cd677d8b889fcc9149c21f239ea
F LICENSE.md df5091916dbb40e6e9686186587125e1b2ff51f022cc334e886c19a0e9982724
@ -721,7 +721,7 @@ F src/random.c 606b00941a1d7dd09c381d3279a058d771f406c5213c9932bbd93d5587be4b9c
F src/resolve.c 31229276a8eb5b5de1428cd2d80f6f1cf8ffc5248be25e47cf575df12f1b8f23
F src/rowset.c 8432130e6c344b3401a8874c3cb49fefe6873fec593294de077afea2dce5ec97
F src/select.c f9d8ece7f0742d7b835efa9590ccda4eccee5b9def7581ec94f556e3c52efe51
F src/shell.c.in 2ebcf31e12b4a2a30338a016524720ce38cbcd6faba72521d77e14d0346e5620
F src/shell.c.in 3399636eedfea4e7f7dfd07634615b6175b6b2228ab236d737f7a656b2c4fc2d
F src/sqlite.h.in b37b3df6fb0684929446c095e81287fbdffd64f55481e4195ee7768f2f0ae72e
F src/sqlite3.rc 5121c9e10c3964d5755191c80dd1180c122fc3a8
F src/sqlite3ext.h 2f30b2671f4c03cd27a43f039e11251391066c97d11385f5f963bb40b03038ac
@ -2135,8 +2135,8 @@ F vsixtest/vsixtest.tcl 6a9a6ab600c25a91a7acc6293828957a386a8a93
F vsixtest/vsixtest.vcxproj.data 2ed517e100c66dc455b492e1a33350c1b20fbcdc
F vsixtest/vsixtest.vcxproj.filters 37e51ffedcdb064aad6ff33b6148725226cd608e
F vsixtest/vsixtest_TemporaryKey.pfx e5b1b036facdb453873e7084e1cae9102ccc67a0
P be5737ee4f4f1d5f8b3126f6eb70210bf3d8b1cdaef51aae818eaaba43ccf722
R 267ff241b67c0fb3bb23fbb9c0b3972f
P 023a9dbe83c0042e9d500e3ae6c0592a468982e4ac278d08c9201967506c7555
R 7357061e9fc49b9bb7a383e84cdcd0ba
U drh
Z 172733ec22e8d6da45a510ca8d2a88d6
Z 674759ef24499708cece7aee8aa913b6
# Remove this line to create a well-formed Fossil manifest.

View File

@ -1 +1 @@
023a9dbe83c0042e9d500e3ae6c0592a468982e4ac278d08c9201967506c7555
4a0e2c6e17eefb296b7e91a13305b2260d6eb869a37bc5e5b79edaf3c19c810a

View File

@ -8033,7 +8033,9 @@ static int do_meta_command(char *zLine, ShellState *p){
azArg[nArg++] = &zLine[h];
while( zLine[h] && !IsSpace(zLine[h]) ){ h++; }
if( zLine[h] ) zLine[h++] = 0;
#ifndef _WIN32 /* Don't convert bare \ on Windows - doing so damages filenames */
resolve_backslashes(azArg[nArg-1]);
#endif
}
}
azArg[nArg] = 0;