mirror of
https://github.com/sqlite/sqlite.git
synced 2025-07-27 20:41:58 +03:00
Update filepath_normalize for unix.
FossilOrigin-Name: 30dd4f887989354b5d01cc80bd9c4bd3528d3ae1
This commit is contained in:
@ -356,9 +356,11 @@ proc do_test {name cmd expected} {
|
||||
|
||||
proc filepath_normalize {p} {
|
||||
# test cases should be written to assume "unix"-like file paths
|
||||
if {$::tcl_platform(platform)!="unix"} {
|
||||
if {$::tcl_platform(platform)=="unix"} {
|
||||
# lreverse*2 as a hack to remove any unneeded {} after the string map
|
||||
lreverse [lreverse [string map {\\ /} [regsub -nocase -all {[a-z]:[/\\]+} $p {/}]]]
|
||||
} {
|
||||
set p
|
||||
}
|
||||
}
|
||||
proc do_filepath_test {name cmd expected} {
|
||||
|
Reference in New Issue
Block a user