fix bug only fist file is been downloaded
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user