I was wondering why filezilla was sending me backward slashes when I am implementing a FTP server.I believe that it may interfere with another function I have to download files. (RETR). This is my CWD code:
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" );
}