sys/ssh - amend DownloadFile

This commit is contained in:
Mahdi Abu Yasmine 2023-11-21 17:22:58 +01:00
parent 7f9a155794
commit 487acaa917

View File

@ -157,7 +157,7 @@ func (s *Ssh) DownloadFile(remoteFile string, localFile string, display bool, cl
if close {
defer scp.Close()
}
if err := s.downloadFile(size, scp, remoteFile, localFile); err != nil {
if err := s.downloadFile(size, scp, remoteFile, localFile); err == nil {
done = sys.CheckSumFile(checksum, localFile)
if display {
echo.Cstyle("usageCom").Echo(" file downloaded !\n")