]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/ftp.cpp
compilation fix after wxCStrData changes
[wxWidgets.git] / src / common / ftp.cpp
index c77c3152422c37b6233a21113e6d18f118435a86..f00c2ee2531b8667a40564f9bf8f1f9097d2f4a3 100644 (file)
@@ -87,7 +87,7 @@ wxFTP::wxFTP()
     m_passwd << wxGetUserId() << wxT('@') << wxGetFullHostName();
 
     SetNotify(0);
-    SetFlags(wxSOCKET_NONE);
+    SetFlags(wxSOCKET_NOWAIT);
     m_bPassive = true;
     SetDefaultTimeout(60); // Default is Sixty Seconds
     m_bEncounteredError = false;
@@ -434,19 +434,20 @@ wxString wxFTP::Pwd()
     if ( CheckCommand(wxT("PWD"), '2') )
     {
         // the result is at least that long if CheckCommand() succeeded
-        const wxChar *p = m_lastResult.c_str() + LEN_CODE + 1;
+        wxString::const_iterator p = m_lastResult.begin() + LEN_CODE + 1;
         if ( *p != _T('"') )
         {
-            wxLogDebug(_T("Missing starting quote in reply for PWD: %s"), p);
+            wxLogDebug(_T("Missing starting quote in reply for PWD: %s"),
+                       wxString(p, m_lastResult.end()));
         }
         else
         {
-            for ( p++; *p; p++ )
+            for ( ++p; (bool)*p; ++p ) // FIXME-DMARS
             {
                 if ( *p == _T('"') )
                 {
                     // check if the quote is doubled
-                    p++;
+                    ++p;
                     if ( !*p || *p != _T('"') )
                     {
                         // no, this is the end
@@ -861,7 +862,7 @@ bool wxFTP::FileExists(const wxString& fileName)
     if ( GetList(fileList, fileName, false) )
     {
         // Some ftp-servers (Ipswitch WS_FTP Server 1.0.5 does this)
-        // displays this behaviour when queried on a non-existing file:
+        // displays this behaviour when queried on a nonexistent file:
         // NLST this_file_does_not_exist
         // 150 Opening ASCII data connection for directory listing
         // (no data transferred)