Normilized win32 paths should never contain backslash
Closed / Fixed792641f95b3198b2b90bc3e3e418a6fb5ab339ddCreated 13 years agoUpdated 13 years ago
Descriptionwiki2014-04-10 13:25:07
When experimenting with extended win32 paths (starting with "//?/" I noticed that sometimes normalized paths started to contain backslashes. That should never happen. It's difficult to write a test-case for it, as it depends how Tcl_Obj's are shared whether it occurs or not. The problem is this commit [05001e9ac2], mainly this part: http://core.tcl.tk/tcl/artifact/103f5cb655?ln=3280-3286. The problem is that the validPathPtr Tcl_Obj is modified in-place to contain backslashes in stead of slashes. If this Tcl_Obj is shared, that is asking for trouble.
Solution: Don't do the slash->backslash translation in-place, and do it for all WinNT paths: Some Win32 API's don't handle slashes as well as backslashes, and the native path is maintained internally in Tcl anyway. All test-cases still pass.
Referenced by2
578237c4c6[792641f95b]: Normalized win32 paths should never contain backslash. check-in2014-04-10 13:59:13bade6c326a[792641f95b]: Normalized win32 paths should never contain backslash. check-in2014-04-10 13:32:14
jan.nijtmanswiki2014-04-10 13:58:54
Fixed in core-8-5-branch [bade6c326a] and trunk [578237c4c6]
Log in (anonymous is fine) to add a comment.