ignore directories

This commit is contained in:
dom 2020-07-26 20:23:34 +02:00
parent fbe8f72668
commit 6421d3e5a0
1 changed files with 3 additions and 0 deletions

View File

@ -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