Skip to content
Tcl Source Code View Ticket
Login

View Ticket

2001-04-17
05:59 • Closed ticket [218578ffff]: auto_execok doesn't cope with whitespace in path... artifact: d94cbd88ae user: dgp
04:56 • Open ticket [218578ffff]. artifact: 6376bb7084 user: dgp
2000-10-26
08:25 • Closed ticket [218578ffff]. artifact: 9df5f65b5f user: welch
01:02 • New ticket [218578ffff]. artifact: 1d20e7a46b user: nobody

auto_execok doesn't cope with whitespace in paths

Closed / Fixed218578ffffffffffffffffffffffffffffffffffCreated 26 years agoUpdated 26 years ago
Descriptionplain2000-10-26 01:02:39
OriginalBugID: 1276 Bug
Version: 8.1b1
SubmitDate: '1999-02-23'
LastModified: '1999-11-03'
Severity: CRIT
Status: Released
Submitter: pat
ChangedBy: hershey
RelatedBugIDs: 1261 1291
OS: Windows 98
Machine: X86
FixedDate: '1999-11-03'
FixedInVersion: 8.2
ClosedDate: '2000-10-25'


Name:
Christopher Nelson

ReproducibleScript:
append env(PATH) "C:/Program Files/Netscape/Communicator/Program"
# The following failes to find netscape
set fullPath [auto_execok netscape]
# The following returns a list
set fullPath [auto_execok netscape.exe]
# This is how I have to cope with the list
exec [lindex $fullPath 0] &
# This is how it works without spaces
append env(PATH) "C:\\program\\collwin"
# The following finds capture.exe ...
set fullPath [auto_execok capture]
# ...and returns a string I can exec directly without eval or lindex.
exec $fullPath &






ObservedBehavior:
File extensions (.exe, etc.) aren't added when searching on paths with
spaces in them.

When a file is found on a path with a space on it, it's quoted in such a
way that it has to be eval'd or extracted from the list.




DesiredBehavior:
auto_execok should behave the same when there is whitespace in a
program's path as when there is not.  I want to be able to do:

set fullPath [auto_execok netscape]
exec $fullPath &






Spaces in path names need to be handled correctly.  03/23/1999 18:38 - surles -

The spaces problem worked, but a path problem was fixed in 8.2b3.
The required lindex was always necessary and is as doc'ed, it is
just that only spaced paths triggered the need. 
-- 08/07/1999 hobbs
welch Closed ticket [218578ffff]. [History diff]2000-10-26 08:25:08
dgp Open ticket [218578ffff]. [History diff]2001-04-17 04:56:58
dgp Closed ticket [218578ffff]. [History diff]2001-04-17 05:59:01
Log in (anonymous is fine) to add a comment.