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
This commit is contained in:
darin%meer.net
2004-04-15 18:26:45 +00:00
parent d6ce781c87
commit b3e9ee2061

View File

@@ -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;
}
//