Ticket #79 (closed defect)
Patch for allowing whitespace in file names
|Reported by:||heiner0||Owned by:|
The attached patch fixes
 libssh2_scp_* do not handle whitespace in file names
It introduces a new (private) function
for "quoting" a shell command argument (e.g. a file name). Example:
gets converted to
(note the single quotation marks).
The quoting style ensures that the results
work with both Bourne Shell derivates (sh, ksh, ksh93, bash, zsh) and C-Shell dialects (csh, tcsh).
The new (private) macro
calculates the maximum size a quoted string can have; this is useful for allocating a memory buffer for the
I've tested the code with
Linux: bash, ksh93, tcsh
Solaris: sh, bash, csh