Hi,
+-From: [EMAIL PROTECTED] (Atsuhiko Yamanaka) --
|_Date: Thu, 24 Jan 2008 12:25:06 +0900 ______
|
|Do you mean that 'baz.txt' is the canonical name of '/dir1/foo'?
|What is the definition for the term 'canonical name'?
According to sftp protocol,
The SSH_FXP_REALPATH request can be used to have the server
canonicalize any given path name to an absolute path. This is useful
for converting path names containing ".." components or relative
pathnames without a leading slash into absolute paths. The format of
the request is as follows:
uint32 id
string path [UTF-8]
where `id' is the request identifier and `path' specifies the path
name to be canonicalized. The server will respond with a
SSH_FXP_NAME packet containing the name in canonical form and a dummy
attributes value. If an error occurs, the server may also respond
with SSH_FXP_STATUS.
It seems OpenSSH's sftp will retrun '/somewhere/baz.txt' for
SSH_FXP_REALPATH '/dir1/foo', as you have expected.
And then, if 'baz.txt' does not exit, it will return 'No such file'.
I don't know every other sftpd will have such a behavior, but
there will not be a problem to allow users to make SSH_FXP_REALPATH
request by themself. ChannelSftp#realpath(String aPath) will be added in
the next release.
Sincerely,
--
Atsuhiko Yamanaka
JCraft,Inc.
1-14-20 HONCHO AOBA-KU,
SENDAI, MIYAGI 980-0014 Japan.
Tel +81-22-723-2150
+1-415-578-3454
Fax +81-22-224-8773
Skype callto://jcraft/
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
JSch-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jsch-users