ignore directories
This commit is contained in:
parent
fbe8f72668
commit
6421d3e5a0
|
@ -29,6 +29,9 @@ func DownloadFTP(user string, password string, path string) error {
|
||||||
}
|
}
|
||||||
|
|
||||||
for _, file := range files {
|
for _, file := range files {
|
||||||
|
if file.Type != ftp.EntryTypeFile {
|
||||||
|
continue
|
||||||
|
}
|
||||||
res, err := c.Retr(file.Name)
|
res, err := c.Retr(file.Name)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
|
|
Loading…
Reference in New Issue