This is what happens:
Error in startup script: can't unset "4.3": no such variable
while executing
"unset $prefsFileVersion"
invoked from within
"if {[file exists $g(rcfile)]} {
if {[catch {source $g(rcfile)} error]} {
set startupError [join [list "There was an error in processing yo..."
(file "/usr/bin/tkdiff" line 894)
The patch actually fixes 2 errors:
After fixing the
unset
,lappend
would fail because there was noopts(fRecurs)
.I don't know under what circumstances there ever would be an
opts(fRecurs)
but I left the statement there, guarded byif {[info exists
.So you can try stuff for yourself, I've attached the RCS file for
.tkdiffrc
. You'll have to rename the attachment to re-insert the leading dot - I couldn't get the Browse dialogue to show me "hidden" files.Revisions 1.1 to 1.3 are 4.3 files
Good catch!
Obviously the "unset" should have been to the variable - NOT its interpolated value; that was just plain brain-dead typing!
Regarding the oversight of 'opts(fRecurs)' your fix is dead-on. I neglected to take into account the introduction of a "once-upon-a-time" Pref variable creation in the evolution of intermediate versions, for which the PRESENT conversion may (or may not) have actually passed thru (which is where it would have been created). Adding the existence check allows EITHER possibility, which is the correct action.
Because these cause a CRASH to occur (if your prior environment is of a sensitive vintage), I think a point-release is in order. Once again, thanks for not only the problem catch but the recommended fix as well. Be on the lookout for V5.5.1, coming shortly.