Special character in ComparisonDifference file name when session.CompareDirectories

Advertisement

imkoala80
Joined:
Posts:
1

Special character in ComparisonDifference file name when session.CompareDirectories

Hi,

When I use .net assembly to compare directories, some of the remote files have "&" in the name.
When I call CompareDirectories, the ComparisonDifference shows the remote file name like "/home/xxxxftp/outgoing/Dividend&Interest.xls"
But the actual file name is "/home/xxxxftp/outgoing/Dividend&Interest.xls".
And then when I call Resolve method, it throws exception:
WinSCP.SessionRemoteException: Can't get attributes of file '/home/xxxxftp/outgoing/Dividend&Interest.xls'.
No such file or directory.
In the session options, I've set the protocol to SFTP, and in the same session if I call EnumerateRemoteFiles, the files names there are correct.

In the WinSCP software, the files are listing correctly and everything is fine there too. I read the FAQ but didn't find any place to enforce UTF-8 in .NET code.

Any help? Thanks a lot.

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
41,253
Location:
Prague, Czechia

Re: Special character in ComparisonDifference file name when session.CompareDirectories

Thanks for your report.

This bug has been added to the tracker:
https://winscp.net/tracker/1897

I'm sending you an email with a development version of WinSCP to the address you have used to register on this forum.

Reply with quote

Guest

Re: Special character in ComparisonDifference file name when session.CompareDirectories

Thanks a lot, the development version is working well.

Reply with quote

Advertisement

You can post new topics in this forum