Artifacts Associated With Ticket 8527d8bec
Ticket change [111d5ff19d] (rid 145170) by mfriedrich on 2016-03-02 21:29:24:
- assignee initialized to: "nobody"
- closer initialized to: "nobody"
- cmimetype initialized to: "text/plain"
- comment initialized to:
On Windows, it seems if paths are used which point to network locations. and those network locations contain junctions, then Tcl resolves those junctions, but should not. Those junctions always point to drives on the server. Tcl treats them as local drives, which they are not. To test: On a Windows server (must not be the same as the below Windows client): * add a new drive/partition, format as NTFS and give it the letter P * create this folder structure: P:\Share\Bar\subdir * create a junction: P:\Share\Foo pointing to --> P:\Share\Bar * create a dummy file: P:\Share\Bar\subdir\dummy.txt * create local user "user" with password "password" * share the folder P:\Share as ShareOnDriveP for user "user" full access On the Windows client/workstation side with a Tcl installation: * mount the network share as drive M: net use m: \\server\ShareOnDriveP /user:server\user password * make sure you have no local drive with letter P * run this on tclsh.exe set result 0 puts "M:/Foo/subdir=[file normalize M:/Foo/subdir]" puts "M:/Bar/subdir=[file normalize M:/Bar/subdir]" puts "\n" if {[catch { cd M:/Bar/subdir set dir [pwd] if {$dir ne "M:/Bar/subdir"} { puts stderr "test 1 failed" set result 1 } else { puts stderr "test 1 passed" } } status]} { puts stderr "test 1 failed\n$errorInfo" set result 1 } puts "\n" if {[catch { cd M:/Bar cd subdir set dir [pwd] if {$dir ne "M:/Bar/subdir"} { puts stderr "test 2 failed" set result 1 } else { puts stderr "test 2 passed" } } status]} { puts stderr "test 2 failed\n$errorInfo" set result 1 } puts "\n" if {[catch { cd C:/ set list [glob -directory M:/Bar/subdir -tail *] if {$list ne {dummy.txt}} { puts stderr "test 3 failed" set result 1 } else { puts stderr "test 3 passed" } } status]} { puts stderr "test 3 failed\n$errorInfo" set result 1 } cd C:/ file delete C:/test-link file delete -force C:/test-target exit $result It produces the output: M:/Foo/subdir=M:/Foo/subdir M:/Bar/subdir=/Bar/subdir test 1 failed couldn't change working directory to "M:/Bar/subdir": no such file or directory while executing "cd M:/Bar/subdir" test 2 passed test 3 failed couldn't read directory "/Bar/subdir/*": no such file or directory while executing "glob -directory M:/Bar/subdir -tail *" - foundin initialized to: "8.6.4.1"
- is_private initialized to: "0"
- login: "mfriedrich"
- priority initialized to: "5 Medium"
- private_contact initialized to: "a3e196ae61223ed094178305110e4d1d8ccbac2b"
- resolution initialized to: "None"
- severity initialized to: "Important"
- status initialized to: "Open"
- submitter initialized to: "mfriedrich"
- subsystem initialized to: "36. Pathname Management"
- title initialized to:
Commands cd, glob and normalize may fail on Windows if used with network locations containing NTFS junctions
- type initialized to: "Bug"