SetUnixAttributes sending wrong value

Hi,

I'm using the SmartFTP library with C++. I found that the SetUnixAttributes() method does not send the correct value to the server.

For example:

result=Ftp_Connection->SetUnixAttributes(bstr_filename,767);

The server log shows:

[20051114 17:27:28] SITE CHMOD 2FF myfile.txt


It should be SITE CHMOD 767 myfile.txt

No, this is no bug. The Unix-like "767" is on octal format (which is normally preceeded by "0", a zero), but the paramater "767" is interpreted as a decimal number. Fix: Use "0x767" or "767h" (depending on the script language you use) as a parameter to specify a hexadecimal number. For digits < 8 these are the same as octal.