fix bug only fist file is been downloaded
This commit is contained in:
parent
a356f0346f
commit
751ce5bf6a
|
@ -36,7 +36,6 @@ func DownloadFTP(user string, password string, path string) error {
|
|||
if err != nil {
|
||||
return err
|
||||
}
|
||||
defer res.Close()
|
||||
|
||||
outFile, err := os.Create(filepath.Join(path, file.Name))
|
||||
if err != nil {
|
||||
|
@ -49,6 +48,7 @@ func DownloadFTP(user string, password string, path string) error {
|
|||
return err
|
||||
}
|
||||
|
||||
res.Close()
|
||||
}
|
||||
|
||||
return nil
|
||||
|
|
Loading…
Reference in New Issue