Changed flags for reading from "r" to "rb", for writing from "w" to "wb"
in the FileReader and FileWriter.
Added FileTransfer::procFLRUpload(...)  method.
Now It's possible the upload files and folders.


git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@423 3789f03b-4d11-0410-bbf8-ca57d06f2519
diff --git a/rfb/FileReader.cxx b/rfb/FileReader.cxx
index 5b533ac..13c677f 100644
--- a/rfb/FileReader.cxx
+++ b/rfb/FileReader.cxx
@@ -27,7 +27,7 @@
 
 FileReader::FileReader()
 {
-  strcpy(m_szMode, "r");
+  strcpy(m_szMode, "rb");
 }
 
 bool 
@@ -35,15 +35,9 @@
 {
   if (m_pFile == NULL) return false;
 
-  unsigned int bytesRead = fread(pBuf, 1, count, m_pFile);
-
+  *pBytesRead = fread(pBuf, 1, count, m_pFile);
+  
   if (ferror(m_pFile)) return false;
-
-  if (feof(m_pFile)) {
-    *pBytesRead = 0;
-  } else {
-    *pBytesRead = bytesRead;
-  }
-
+ 
   return true;
 }