diff options
author | Dennis Syrovatsky <dennis@tightvnc.com> | 2006-05-22 08:14:52 +0000 |
---|---|---|
committer | Dennis Syrovatsky <dennis@tightvnc.com> | 2006-05-22 08:14:52 +0000 |
commit | f04f7eb204c321e97466f9efdf119825ef535903 (patch) | |
tree | 476eae747df5af89992e81d08566c9a8a6b33a78 | |
parent | cdb4c59902dee4b502badc17ebfb219b6d174c94 (diff) | |
download | tigervnc-f04f7eb204c321e97466f9efdf119825ef535903.tar.gz tigervnc-f04f7eb204c321e97466f9efdf119825ef535903.zip |
Small code improvements.
Fixed bug with it - the server didn't send message FileListData when the requested folder is unavailable for any reasons.
git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@574 3789f03b-4d11-0410-bbf8-ca57d06f2519
-rw-r--r-- | rfb/SFileTransfer.cxx | 5 | ||||
-rw-r--r-- | vncviewer/FTDialog.cxx | 13 | ||||
-rw-r--r-- | vncviewer/FileTransfer.cxx | 6 |
3 files changed, 14 insertions, 10 deletions
diff --git a/rfb/SFileTransfer.cxx b/rfb/SFileTransfer.cxx index fe4e9afc..6f444e9b 100644 --- a/rfb/SFileTransfer.cxx +++ b/rfb/SFileTransfer.cxx @@ -83,8 +83,9 @@ SFileTransfer::processFileListRequest() if (flags & 0x10) bDirOnly = true; FileInfo fi; - if (!makeFileList(szDirName, &fi, bDirOnly)) return false; - + if (!makeFileList(szDirName, &fi, bDirOnly)) { + flags = (flags | 0x80); + } return m_writer.writeFileListData((unsigned char)flags, &fi); } diff --git a/vncviewer/FTDialog.cxx b/vncviewer/FTDialog.cxx index 409d3b17..5f71f7dd 100644 --- a/vncviewer/FTDialog.cxx +++ b/vncviewer/FTDialog.cxx @@ -403,9 +403,12 @@ FTDialog::onRemoteBrowse() m_bLocalBrowsing = false; m_pBrowseDlg = new FTBrowseDlg(this); - m_pBrowseDlg->create(); - - m_pFileTransfer->requestFileList("", FT_FLR_DEST_BROWSE, true); + if (m_pBrowseDlg->create()) { + m_pFileTransfer->requestFileList("", FT_FLR_DEST_BROWSE, true); + } else { + delete m_pBrowseDlg; + m_pBrowseDlg = NULL; + } } void @@ -439,7 +442,7 @@ FTDialog::showLocalLVItems() void FTDialog::showRemoteLVItems() { - m_pFileTransfer->requestFileList(m_szRemotePathTmp, FT_FLR_DEST_MAIN, 0); + m_pFileTransfer->requestFileList(m_szRemotePathTmp, FT_FLR_DEST_MAIN, false); } void @@ -473,6 +476,8 @@ void FTDialog::reqFolderUnavailable() { strcpy(m_szRemotePathTmp, m_szRemotePath); + SetWindowText(m_hwndRemotePath, m_szRemotePath); + UpdateWindow(m_hwndFTDialog); } int diff --git a/vncviewer/FileTransfer.cxx b/vncviewer/FileTransfer.cxx index 46d4799a..cf57072f 100644 --- a/vncviewer/FileTransfer.cxx +++ b/vncviewer/FileTransfer.cxx @@ -382,8 +382,7 @@ FileTransfer::createRemoteFolder(char *pPath, char *pName) sprintf(fullPath, "%s\\%s", pPath, pName); m_pFTDialog->setStatusText("Creating Remote Folder: %s", fullPath); writeFileCreateDirRqst(strlen(fullPath), fullPath); - m_queueFileListRqst.add(pPath, 0, 0, FT_FLR_DEST_MAIN); - writeFileListRqst(strlen(pPath), pPath, false); + requestFileList(pPath, FT_FLR_DEST_MAIN, false); } void @@ -397,8 +396,7 @@ FileTransfer::renameRemote(char *pPath, char *pOldName, char *pNewName) writeFileRenameRqst(strlen(fullOldName), strlen(fullNewName), fullOldName, fullNewName); - m_queueFileListRqst.add(pPath, 0, 0, FT_FLR_DEST_MAIN); - writeFileListRqst(strlen(pPath), pPath, false); + requestFileList(pPath, FT_FLR_DEST_MAIN, false); } bool |