Quoting of the file name is actually supposed to be done by our API (inside the GetFile
method). If you do it yourself, GetFile
would consider those quotes to be a part of the file name and quote them again, which would lead to wrong results. So please try just calling m_scp->GetFile(srcFile, m_stream)
instead.
However, checking the actual behavior, I noticed that our API is actually not handling single quotes, which seems to be a bug. It's strange it went unnoticed for so long. Apparently, filenames with single quotes are quite rare, and we know that Scp
class is used much less often than Sftp
. Thanks for bringing this issue to our attention, we will look into it and resolve it for the next release!
(Please discard the second part of the reply above. After double-checking this, is looks like handling of single quotes is actually correct as well. If you encounter any file name that appears to be handled wrongly if passed unquoted, let us know.)