Index: source/com/enterprisedt/net/ftp/FTPClient.java =================================================================== --- source/com/enterprisedt/net/ftp/FTPClient.java (revision 3480) +++ source/com/enterprisedt/net/ftp/FTPClient.java (working copy) @@ -417,12 +417,14 @@ * @param append true if appending, false otherwise */ private void initPut(String remoteFile, boolean append) throws IOException, FTPException { + String cmd = append ? "APPE " : "STOR "; + // PRET support + control.sendCommand("PRET "+cmd+remoteFile); // set up data channel data = control.createDataSocket(connectMode); data.setTimeout(timeout); // send the command to store - String cmd = append ? "APPE " : "STOR "; FTPReply reply = control.sendCommand(cmd+remoteFile); // Can get a 125 or a 150 @@ -436,6 +438,8 @@ * @param remoteFile name of remote file */ private void initGet(String remoteFile, long resume) throws IOException, FTPException { + // PRET support + control.sendCommand("PRET RETR "+remoteFile); // set up data channel data = control.createDataSocket(connectMode); data.setTimeout(timeout); @@ -522,6 +526,9 @@ * @return an array of directory listing strings */ public BufferedReader dir(String encoding, String command) throws IOException, FTPException { + // PRET support + control.sendCommand("PRET "+command); + // set up data channel data = control.createDataSocket(connectMode); data.setTimeout(timeout);