Bug in FTP package

  • Matthew Soldo

    Matthew Soldo - 2002-06-21

    I discovered a bug in the ftp package. When ftp::Get is issued with the -variable flag and the source is a fully file name (with its directory included: /foo/bar.txt) and that directory does not exist on the source machine, the get fails because the procedure incorrectly checks to make sure that the source directory exists (this is incorrect because it should be putting the source into a variable, not a file).

    I hacked a quick fix by changing line 1963 of ftp.tcl to:
    if {![file exists [file dirname $dest]] && $ftp(inline) == 0} {

    It now does what I want it to, but I didn't look to closely at the internals of the ftp::Get proc so I don't know if this will cause any undesired effects.

    • Matthew Soldo

      Matthew Soldo - 2002-06-22

      This quick fix definitely causes some problems elsewhere.


Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.

No, thanks