Bugs item #2233372, was opened at 2008-11-07 08:50
Message generated for change (Comment added) made by heiner0
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=703942&aid=2233372&group_id=125852

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: None
Group: None
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Heiner (heiner0)
Assigned to: Nobody/Anonymous (nobody)
Summary: Patch for allowing whitespace in file names

Initial Comment:
The attached patch fixes

 [1960894] libssh2_scp_* do not handle whitespace in file names

It introduces a new (private) function
    libssh2_shell_quotearg()

for "quoting" a shell command argument (e.g. a file name). Example:
    one two

gets converted to
    'one two'

(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
    libssh2_shell_quotedsize()

calculates the maximum size a quoted string can have; this is useful for 
allocating a memory buffer for the
results.

I've tested the code with
    Linux:   bash, ksh93, tcsh
    Solaris: sh, bash, csh


----------------------------------------------------------------------

Comment By: Heiner (heiner0)
Date: 2008-11-07 11:49

Message:
This entry is a duplicate of 1960894 and can be close.


----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=703942&aid=2233372&group_id=125852

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
libssh2-devel mailing list
libssh2-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libssh2-devel

Reply via email to