mina-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sai Pullabhotla <sai.pullabho...@jmethods.com>
Subject Re: [VOTE] Release SSHD 0.4.0 (2nd try)
Date Wed, 05 May 2010 13:50:46 GMT
How about something like this:

    protected void sendAbsoluteName(int id, File file) throws IOException {
        Buffer buffer = new Buffer();
        buffer.putByte((byte) SSH_FXP_NAME);
        buffer.putInt(id);
        buffer.putInt(1);
        String path = file.getPath();
        if(File.separatorChar != '/') {
            path = path.replace(File.separatorChar, '/');
        }
        if(path.charAt(0) != '/') {
            path = '/' + path;
        }
        buffer.putString(path);
        //buffer.putString(file.getPath());
        writeAttrs(buffer, file);
        send(buffer);
    }

Regards,
Sai Pullabhotla





On Wed, May 5, 2010 at 8:45 AM, Sai Pullabhotla
<sai.pullabhotla@jmethods.com> wrote:
> I removed the second call to place the path in the buffer and seems to
> be working fine.
>
> Regards,
> Sai Pullabhotla
>

Mime
View raw message