cURL / Mailing Lists / curl-users / Single Mail

curl-users

RE: curl: (79) scp: /test.txt: No such file or directory

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Tue, 29 Jun 2010 19:50:27 +0200 (CEST)

On Tue, 29 Jun 2010, Sharma, Meghnath wrote:

> You are right Alex! Replacing the ~ sign with the actual path worked. That's
> basically a workaround. But ~ sign was working for me in the earlier libssh2
> version; and this sign works for SFTP too.
>
> Can someone throw the light on the issue?

First, please don't top-post.

The ~ expansion is not done by libssh2 so I don't think it is related to
libssh2 version at all.

However, the code within libcurl that does the ~ expansion is different for
SCP and SFTP although it isn't at all clear to me WHY this is the case. If you
(can) build your own curl from source, it would be fun to see if you can
modify lib/ssh.c:ssh_getworkingpath() to use the SFTP approach even for SCP
to check if that makes it work for you.

-- 
  / daniel.haxx.se
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-users
FAQ:        http://curl.haxx.se/docs/faq.html
Etiquette:  http://curl.haxx.se/mail/etiquette.html
Received on 2010-06-29