Bug 523127 - Firefox can't list directories on Sysax FTP server. r=dougt, sr=biesi
authorMichal Novotny <michal.novotny@gmail.com>
Fri, 11 Jun 2010 20:52:24 +0200
changeset 43546 4c7ff4b0f2baa5c0d341f69ab6e1a1f5ccc24e9e
parent 43545 e824d25382f721130ee7036a9cecb410417dca57
child 43547 ed4923be783d07d09406d7e2449feac6948dd6b4
push id1
push userroot
push dateTue, 26 Apr 2011 22:38:44 +0000
treeherdermozilla-beta@bfdb6e623a36 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdougt, biesi
bugs523127
milestone1.9.3a6pre
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 523127 - Firefox can't list directories on Sysax FTP server. r=dougt, sr=biesi
netwerk/protocol/ftp/nsFtpConnectionThread.cpp
--- a/netwerk/protocol/ftp/nsFtpConnectionThread.cpp
+++ b/netwerk/protocol/ftp/nsFtpConnectionThread.cpp
@@ -1533,17 +1533,17 @@ nsFtpState::R_pasv() {
         rv = mDataTransport->OpenInputStream(0,
                                              nsIOService::gDefaultSegmentSize,
                                              nsIOService::gDefaultSegmentCount,
                                              getter_AddRefs(input));
         NS_ENSURE_SUCCESS(rv, FTP_ERROR);
         mDataStream = do_QueryInterface(input);
     }
 
-    if (mRETRFailed || (!mPath.IsEmpty() && mPath.Last() == '/'))
+    if (mRETRFailed || mPath.IsEmpty() || mPath.Last() == '/')
         return FTP_S_CWD;
     return FTP_S_SIZE;
 }
 
 ////////////////////////////////////////////////////////////////////////////////
 // nsIRequest methods:
 
 static inline