1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-07-30 19:03:16 +03:00

On Windows, make sure the returned test current directory value does not contain any backslashes.

FossilOrigin-Name: efee39e64bd95c284220fdb0ae8ee6c1847fadab
This commit is contained in:
mistachkin
2012-03-08 20:28:31 +00:00
parent f8a784645c
commit 533b8f6d47
3 changed files with 14 additions and 8 deletions

View File

@ -155,7 +155,13 @@ proc getFileRetryDelay {} {
#
proc get_pwd {} {
if {$::tcl_platform(platform) eq "windows"} {
return [string trim [exec -- $::env(ComSpec) /c echo %CD%]]
#
# NOTE: Cannot use [file normalize] here because it would alter the
# case of the result to what Tcl considers canonical, which would
# defeat the purpose of this procedure.
#
return [string map [list \\ /] \
[string trim [exec -- $::env(ComSpec) /c echo %CD%]]]
} else {
return [pwd]
}