Skip to content
Tcl Source Code View Ticket
Login

View Ticket

2003-11-11
00:57 • Closed ticket [836208ffff]: misleading error message for file link ... cmd... artifact: 86483b0785 user: vincentdarley
2003-11-05
17:14 • Ticket [836208ffff]: 4 changes artifact: d7d7dfacb9 user: vincentdarley
16:11 • Ticket [836208ffff]: 2 changes artifact: 31cb885377 user: dkf
02:02 • New ticket [836208ffff]. artifact: 9feab5a5b2 user: hemanglavana

misleading error message for [file link ...] cmd

Closed / Fixed836208ffffffffffffffffffffffffffffffffffCreated 23 years agoUpdated 23 years ago
Descriptionplain2003-11-05 02:02:51
When I try to create a link in a directory which does
not exist, the [file link ..] command prints a
misleading error message. See below:

$ tclsh
% file link tmp/foo tp
could not create new link "tmp/foo" since target "tp"
doesn't exist

### tp does exist, it is the tmp dir which does not

% mkdir tmp
% file link tmp/foo tp
tp
% 

This is with tcl8.4.4 on solaris.
dkf Ticket [836208ffff]: 2 changes [History diff]2003-11-05 16:11:57
vincentdarleyplain2003-11-05 17:14:22
Logged In: YES 
user_id=32170

The problem would appear to be in these lines in tclCmdAH.c:

    } else if (errno == ENOENT) {
Tcl_AppendResult(interp, "could not create new link \"", 
Tcl_GetString(objv[index]), 
"\" since target \"", 
Tcl_GetString(objv[index+1]), 
"\" doesn't exist", 
(char *) NULL);

perhaps this needs changing.  I won't have time to look
further at this for a few days/week..
vincentdarleyplain2003-11-11 00:57:40
Logged In: YES 
user_id=32170

Fixed.
Log in (anonymous is fine) to add a comment.