Tcl Library Source Code

View Ticket
Login
Ticket UUID: 618241
Title: ftp::Get <source> -variable <var> bombs
Type: Bug Version: None
Submitter: rkroll Created on: 2002-10-03 20:12:20
Subsystem: ftp Assigned To: andreas_kupries
Priority: 5 Medium Severity:
Status: Closed Last Modified: 2026-11-21 08:42:16
Resolution: Fixed Closed By: serhiy.storchaka
    Closed on: 2026-11-21 08:42:16
Description:
ftp::Get <source> -variable <var>  is used by ftpvfs
and fails everytime. 

Test code:
  package require ftp

  set ftp [ftp::Open cdaftp.harvard.edu ftp  
[email protected]]
  ftp::Get $ftp  
pub/science/ao03/cat4/3672/primary/acisf03672N001_1_sum2.html
-var

  puts $X
  exit


I don't see how this ever worked.  If -variable is set
then $dest gets set to the $source.

If $ftp(inline) then no $dest should be expexted,
$dest should only be set on !$ftp(inline).


ftp.tcl:
1955c1955
<     if {$ftp(inline) != 2} {
---
>     if {$ftp(inline) == 0} {
User Comments: serhiy.storchaka added on 2026-11-21 08:42:16:

Get -variable set the local destination to the remote path and failed when the remote path had a directory part. Fixed in [0515c88443] (SF bug 582668, released with ftp 2.4 in tcllib 1.4) with the change suggested here. Verified: ftp 2.3.1 fails with 'directory "sub" ... does not exist', trunk returns the content in the variable.