jomenxiao / ftp4go Goto Github PK
View Code? Open in Web Editor NEWAutomatically exported from code.google.com/p/ftp4go
License: BSD 3-Clause "New" or "Revised" License
Automatically exported from code.google.com/p/ftp4go
License: BSD 3-Clause "New" or "Revised" License
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
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
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
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
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
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.