asyncftpclient: add missing file.close to retrFile

This commit is contained in:
zargot 2018-07-02 18:07:24 +02:00 • committed by GitHub
commit e63369f2b9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -304,6 +304,7 @@ proc retrFile*(ftp: AsyncFtpClient, file, dest: string,
raise newException(ReplyError, "Reply has no file size.") raise newException(ReplyError, "Reply has no file size.")
await getFile(ftp, destFile, fileSize, onProgressChanged) await getFile(ftp, destFile, fileSize, onProgressChanged)
destFile.close()
proc doUpload(ftp: AsyncFtpClient, file: File, proc doUpload(ftp: AsyncFtpClient, file: File,
onProgressChanged: ProgressChangedProc) {.async.} = onProgressChanged: ProgressChangedProc) {.async.} =