1
0
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:
shaneh
2011-06-21 19:38:16 +00:00
parent 5550517e2b
commit c489640779
3 changed files with 10 additions and 8 deletions

View File

@ -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} {