WinSCP 4.0.5 & Mac Leopard problems

Advertisement

Joel McClung
Guest

WinSCP 4.0.5 & Mac Leopard problems

MacOS can have extra characters at the end of the permissions to indicate extra attributes. Here's some examples:

-rw-r--r--@ 1 joel admin 15364 Nov 27 16:10 .DS_Store
drwx------+ 12 joel admin 408 Nov 28 14:45 Desktop

In MacOS 10.5 (Leopard), Apple added '@' to indicate a file has extended attributes. WinSCP 4.0.5 does not handle the '@' character. When connecting from my Windows XP box to my Mac, I get this error:
Error listing directory '/Users/joel'
'@' is not a valid integer value.

It appears there is code in core/RemoteFiles.cpp to handle the '+', but not the '@'.

I believe the fix is:
% diff core/RemoteFiles.cpp*
701c701
<     if (!Line.IsEmpty() && ((Line[1] == '+') || (Line[1] == '@')))
---
>     if (!Line.IsEmpty() && (Line[1] == '+'))
705c705
<     else if ((Line.Length() >= 2) && (Line[1] == ' ') && ((Line[2] == '+') || (Line[2] == '@')))
---
>     else if ((Line.Length() >= 2) && (Line[1] == ' ') && (Line[2] == '+'))

Here's the relevant information from the man page for "ls":
If the file or directory has extended attributes, the permissions field printed by the -l option is followed by a '@' character. Otherwise, if the file or directory has extended security information, the permissions field printed by the -l option is followed by a '+' character.

Reply with quote

Advertisement

digital_shiva
Guest

Re: WinSCP 4.0.5 & Mac Leopard problems

martin wrote:

OK, thanks. I'll solve that in the next release.

Many thanks for this submission and response. I've just bought a mac pro with leopard and am looking forward to using IP over firewire to connect my mac and pc. I'm not agile enough to work with source code and recompile it with the submitted fix above. I'll wait for 4.0.6. Do you have any idea when 4.0.6 will be released?

Reply with quote

martin
Site Admin
martin avatar

Re: WinSCP 4.0.5 & Mac Leopard problems

digital_shiva wrote:

I'll wait for 4.0.6. Do you have any idea when 4.0.6 will be released?
Maybe before end of the year.

Reply with quote

nikkk
Guest

dot as extended attribute

Unexpected directory listing line 'drwxr-x---. 25 root root 4096 Jun 23 11:17 .'.
'.' is not a valid integer value


With Fedora 11 and SElinux ativated, I don't see an option to manage the "dot" on 4.2.1 build 428.

cheers,
nikkk

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
40,476
Location:
Prague, Czechia

Re: dot as extended attribute

nikkk wrote:

Unexpected directory listing line 'drwxr-x---. 25 root root 4096 Jun 23 11:17 .'.
'.' is not a valid integer value


With Fedora 11 and SElinux ativated, I don't see an option to manage the "dot" on 4.2.1 build 428.
This issue is being tracked already.

Reply with quote

Advertisement

You can post new topics in this forum