Giter VIP home page Giter VIP logo

ftp4go's People

Contributors

mezzato avatar

Watchers

 avatar

ftp4go's Issues

Incorrect parsing of SIZE 213 response

What steps will reproduce the problem?
1. call the ftp.Size() method on a file

What is the expected output?

An int

What do you see instead?

A panic (slice bounds out of range) at client.go:404

Please provide any additional information below.

Fix to line 404...

size, _ = strconv.Atoi(strings.TrimSpace(response.Message))


Original issue reported on code.google.com by [email protected] on 1 Aug 2014 at 2:27

Panic on Size() with non-existent file

What steps will reproduce the problem?
1. Call ftp.Size("this_file_doesnt_exist")

What is the expected output?

An error message.

What do you see instead?

A panic in client.go:402

Please provide any additional information below.

Fixed with...

401:  response, err := ftp.SendAndRead(SIZE_FTP_CMD, filename)
402:  if err != nil {
403:     return
494:  }

Original issue reported on code.google.com by [email protected] on 1 Aug 2014 at 2:34

Sample file has an error in it

What steps will reproduce the problem?
1. The sample on the project home page fails to compile

You can fix the sample by changing the line to have a ,""
empty string at the end:

        //connect
        _, err := ftpClient.Connect("127.0.0.1", ftp4go.DefaultFtpPort, "")

Original issue reported on code.google.com by [email protected] on 14 May 2014 at 5:12

UploadFile results in a panic when a none existing local path is given

Hi,

When using the FTP.UploadFile method and given it a none existing localpath, 
you'll get a panic instead of an error "open ...: no such file or directory". 
It is trying to close the file pointer even when the file couldn't be opened in 
the first place.

Thank you for your time developing this package, you're AWESOME!

Djuke

Original issue reported on code.google.com by [email protected] on 25 Oct 2013 at 7:13

missing FTP SetTimeout method

Hello, i missed this method, and added it in my own copy of ftp4go :

// SetTimeout sets the timeout for command and data transfers, in milliseconds.
// (added by [email protected])
func (ftp *FTP) SetTimeout(msecs int64) {
    if msecs >= 0 {
        ftp.timeoutInMsec = msecs
        if ftp.conn != nil {
            ftp.conn.SetDeadline(getTimeoutInMsec(ftp.timeoutInMsec))
        }
    }
}

Having this in the official package seems like a good idea, all the more 
because the default of 1000 ms is really short!

Thanks for your efforts in developing this package, i have a need for it, and 
it seems to work fine :)
Do you plan on adding TLS support any time soon?


Erwin
[email protected]


Original issue reported on code.google.com by [email protected] on 27 Jul 2012 at 6:28

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.