blob: f50cd18d8e72c31451ed5e6ecd60d35a43509f15 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
proc pddplink_open {filename dir} {
if {[string first "://" $filename] > -1} {
menu_openhtml $filename
} elseif {[file pathtype $filename] eq "absolute"} {
menu_openhtml $filename
} elseif {[file exists [file join $dir $filename]]} {
set fullpath [file normalize [file join $dir $filename]]
set dir [file dirname $fullpath]
set filename [file tail $fullpath]
menu_doc_open $dir $filename
} else {
bell ;# beep on error to provide instant feedback
pdtk_post "\[pddplink\] ERROR file not found: $filename\n"
}
}
|