diff --git a/mozilla/netwerk/protocol/ftp/src/nsFtpConnectionThread.cpp b/mozilla/netwerk/protocol/ftp/src/nsFtpConnectionThread.cpp index ae9659a1876..53e5c9569ed 100644 --- a/mozilla/netwerk/protocol/ftp/src/nsFtpConnectionThread.cpp +++ b/mozilla/netwerk/protocol/ftp/src/nsFtpConnectionThread.cpp @@ -1288,7 +1288,9 @@ nsFtpState::R_type() { nsresult nsFtpState::S_cwd() { - nsCAutoString cwdStr(mPath); + nsCAutoString cwdStr; + if (mAction != PUT) + cwdStr = mPath; if (cwdStr.IsEmpty() || cwdStr.First() != '/') cwdStr.Insert(mPwd,0); if (mServerType == FTP_VMS_TYPE) @@ -1862,7 +1864,10 @@ nsFtpState::R_pasv() { // hold a reference to the copier so we can cancel it if necessary. mDPipeRequest = copier; - return FTP_S_STOR; + // update the current working directory before sending the STOR + // command. this is needed since we might be reusing a control + // connection. + return FTP_S_CWD; } //