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 {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
defer res.Close()
|
|
||||||
|
|
||||||
outFile, err := os.Create(filepath.Join(path, file.Name))
|
outFile, err := os.Create(filepath.Join(path, file.Name))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
@ -49,6 +48,7 @@ func DownloadFTP(user string, password string, path string) error {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
res.Close()
|
||||||
}
|
}
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
|
|
Loading…
Reference in New Issue