为什么FTP protcol文件Zilla向我发送反向斜杠?

为什么FTP protcol文件Zilla向我发送反向斜杠?,ftp,network-programming,network-protocols,ftp-server,Ftp,Network Programming,Network Protocols,Ftp Server,我想知道为什么filezilla在我实现FTP服务器时向我发送反向斜杠。我相信这可能会干扰我下载文件的另一个功能。(RETR)。 这是我的CWD代码: private void Cwd( String param ){ System.out.println(param); System.out.println("CWD OLD " + this.fileManager.getPath()); String old = this.fileManager.getPath()

我想知道为什么filezilla在我实现FTP服务器时向我发送反向斜杠。我相信这可能会干扰我下载文件的另一个功能。(RETR)。 这是我的CWD代码:

private void Cwd( String param ){
    System.out.println(param);

    System.out.println("CWD OLD " + this.fileManager.getPath());
    String old = this.fileManager.getPath();
    if( !param.startsWith("/") ){
        param = old + File.separator + param;

    }
    this.fileManager = new File( param );
    System.out.println("NEW ONE CWD " + this.fileManager.getPath());
    if( !this.fileManager.isDirectory() )
        this.fileManager = new File( old );

    sendOut( "200 cwd OK" );

}

它发送给您的内容取决于它的平台。这里没有错误。你没有任何理由期待
/
。您也没有任何理由在目录名中使用自己的本地
文件.separator
。它在哪里向您发送反斜杠?
CWD
命令中有正斜杠。向我们显示FileZilla日志文件(一个真实的日志文件,而不是来自GUI的消息日志)。