]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/ftp.cpp
escape _ in LaTeX sources
[wxWidgets.git] / src / common / ftp.cpp
index c7318863eec56122d2fda3660dd92cb7cdf9467b..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