Skip to content
Tcl Source Code View Ticket
Login

View Ticket

2004-11-18
00:49 • Closed ticket [459569ffff]: source and open fail on shortcut files plus 7 ot... artifact: e98a28b94d user: hobbs
2003-11-13
05:51 • Ticket [459569ffff]: 1 change artifact: 7d3a08f734 user: vincentdarley
05:24 • Ticket [459569ffff]: 1 change artifact: d716efed38 user: dgp
2001-09-08
00:06 • Ticket [459569ffff]: 5 changes artifact: 931808e946 user: vincentdarley
2001-09-07
23:19 • Ticket [459569ffff]: 2 changes artifact: 223c335669 user: dgp
15:51 • New ticket [459569ffff]. artifact: a7d8e56ec5 user: randalt

source and open fail on shortcut files

Closed / Wont Fix459569ffffffffffffffffffffffffffffffffffCreated 25 years agoUpdated 22 years ago
Descriptionplain2001-09-07 15:51:38
sourcing a link to a tcl script fails under NT4.0 and 
TCL8.3
the command

source file.lnk 

produces the message

invalid command name "L ..."

It appears that the shortcut descriptor file is being 
read rather than the file the shortcut points to.

The following commands also exhibit similar behavior

set filehandle [open file.lnk]
read file.lnk

This returns the contents of the shortcut descriptor 
not the file pointed to by the shortcut

file copy file.lnk newfile

The contents of newfile are the shortcut descriptor 
not the contents of the file pointed to by the 
shortcut.
dgp Ticket [459569ffff]: 2 changes [History diff]2001-09-07 23:19:59
vincentdarleyplain2001-09-08 00:06:35
Logged In: YES 
user_id=32170

There is no support for links in Windows Tcl, because there 
seems to be no support for them in the Win32 APIs which Tcl 
uses (e.g. CopyFileW or CopyFileA).  Windows seems to 
expect an application to check every file accessed, whether 
it is a .lnk and then take some other action.  On Mac/Unix 
the OS does this for you.

The upshot is that to support this would involve lots and 
lots of changes and every single file access of any kind in 
Tcl would have to go through these extra hurdles...  Not 
ideal!  I don't know whether there are better approaches...
dgp Ticket [459569ffff]: 1 change [History diff]2003-11-13 05:24:30
vincentdarley Ticket [459569ffff]: 1 change [History diff]2003-11-13 05:51:04
hobbsplain2004-11-18 00:49:16
Logged In: YES 
user_id=72656

As noted, Windows shortcut files are not real links, which
are supported since 8.4.
Log in (anonymous is fine) to add a comment.