From b3e9ee20617fa880b9652a00ccb6e1723f034eef Mon Sep 17 00:00:00 2001 From: "darin%meer.net" Date: Thu, 15 Apr 2004 18:26:45 +0000 Subject: [PATCH] fixes bug 238847 "working path's problem of FTP connection" r=dougt sr=bryner a=asa git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_7_BRANCH@154930 18797224-902f-48f8-a5cc-f745e15eee43 --- .../netwerk/protocol/ftp/src/nsFtpConnectionThread.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) 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; } //