]> git.saurik.com Git - wxWidgets.git/blobdiff - interface/wx/protocol/ftp.h
Add wxColour::{Set,Get}RGB[A]().
[wxWidgets.git] / interface / wx / protocol / ftp.h
index 12bbca605f099d4189504b33d3a4c7548a1b2682..364e5e434d9cb4c6634c77c8e09b69bea8e5f13e 100644 (file)
@@ -47,14 +47,20 @@ enum TransferMode
         }
 
         ftp.ChDir("/pub/2.8.9");
-        wxInputStream *i = ftp.GetInputStream("wxWidgets-2.8.9.tar.bz2");
+        const char *filename = "wxWidgets-2.8.9.tar.bz2";
+        int size = ftp.GetFileSize(filename);
+        if ( size == -1 )
+        {
+            wxLogError("Couldn't get the file size for \"%s\"", filename);
+        }
+
+        wxInputStream *i = ftp.GetInputStream(filename);
         if ( !in )
         {
             wxLogError("Couldn't get the file");
         }
         else
         {
-            size_t size = in->GetSize();
             char *data = new char[size];
             if ( !in->Read(data, size) )
             {