Post a reply

Before posting, please read how to report bug or request support effectively.

Bug reports without an attached log file are usually useless.

Add an Attachment

If you do not want to add an Attachment to your Post, please leave the Fields blank.

(maximum 10 MB; please compress large files; only common media, archive, text and programming file formats are allowed)


Topic review


Re: WinSCP sftp file size attribute

SFTP specification says:

The `size' field specifies the size of the file on disk, in bytes. If it is present during file creation, it should be considered a hint as to the files eventual size.

Files opened with the SSH_FXF_TEXT flag may have a size that is greater or less than the value of the size field.

So I believe that that server should not compare bytes received with the size field.

What SFTP server has this problem?

WinSCP sftp file size attribute

WinSCP' sftp always uses the original file size in SSH_FILEXFER_ATTR_SIZE, even for ASCII transfers when some bytes (record delimiters) may be stripped or converted as part of this type of transmission. If the receiving side is monitoring the number of bytes received and compares it to the original number of bytes reported in the file attributes, there is a mismatch. Would it be possible to report the number of bytes in file attributes by WinSCP after the conversion of a file to ASCII takes place so it matches the number of bytes sent, or not report it at all if it cannot be determined.