scrolledhtml -import method fails on Windows with valid pathname.
Status:
Open
Type:
Code_Defect
Severity:
Critical
Priority:
Subsystem:
Resolution:
Last Modified:
2016-08-31 23:21:47
Version Found In:
User Comments:
anonymous added on 2016-08-31 23:21:47:
The code below from the scrolledhtml widget import method will not work with Windows file pathnames. It's wrong on a few counts.
-link {
#
# got -link, so set path relative to current locale, if path
# is a relative pathname
#
if {[string compare "." [file dirname $filename]] == 0} {
set f [open $_cwd/$filename r]
} else {
if {[string index [file dirname $filename] 0] != "/" &&\
[string index [file dirname $filename] 0] != "~"} {
set f [open $_cwd/$filename r]
append _cwd /
append _cwd [file dirname $filename]
} else {
set f [open $filename r]
set _cwd [file dirname $filename]
}
}
}