You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The file opened on line 22 is never closed if the TransferOpen() call fails.
You could of course call file.Close() within that else block, my only concern is that still results in an empty file being created.
Another option is to call TransferOpen() first, and then attempt to open the file.
I can submit a PR once a solution is agreed upon.
The text was updated successfully, but these errors were encountered:
https://github.com/fclairamb/ftpserver/blob/d06e1a0d4a20bf8a311961952b15c550a1acbfd9/server/handle_files.go#L22-L35
The file opened on line 22 is never closed if the
TransferOpen()
call fails.You could of course call
file.Close()
within that else block, my only concern is that still results in an empty file being created.Another option is to call
TransferOpen()
first, and then attempt to open the file.I can submit a PR once a solution is agreed upon.
The text was updated successfully, but these errors were encountered: