From d9684d44d280c46a323af4c1da18171a1e4d7618 Mon Sep 17 00:00:00 2001 From: "Jerry (Xinyu Hou)" Date: Wed, 3 Jun 2015 16:17:26 -0700 Subject: [PATCH] Added fake drag file list #4584 --- src/lib/server/ClientProxy1_5.cpp | 2 +- src/lib/server/Server.cpp | 6 +++--- src/lib/server/Server.h | 5 +++-- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/src/lib/server/ClientProxy1_5.cpp b/src/lib/server/ClientProxy1_5.cpp index 49fc10f3..60fc8aa4 100644 --- a/src/lib/server/ClientProxy1_5.cpp +++ b/src/lib/server/ClientProxy1_5.cpp @@ -84,7 +84,7 @@ ClientProxy1_5::fileChunkReceived() m_events->addEvent(Event(m_events->forIScreen().fileRecieveCompleted(), server)); } else if (result == kStart) { - String filename = server->getDragFileList().at(0).getFilename(); + String filename = server->getFakeDragFileList().at(0).getFilename(); LOG((CLOG_NOTIFY "File Transmission Started: Start receiving %s.", filename.c_str())); } } diff --git a/src/lib/server/Server.cpp b/src/lib/server/Server.cpp index 6942e356..ca4f15e2 100644 --- a/src/lib/server/Server.cpp +++ b/src/lib/server/Server.cpp @@ -2070,7 +2070,7 @@ Server::writeToDropDirThread(void*) ARCH->sleep(.1f); } - DropHelper::writeToDir(m_screen->getDropTarget(), m_dragFileList, + DropHelper::writeToDir(m_screen->getDropTarget(), m_fakeDragFileList, m_receivedFileData); } @@ -2387,7 +2387,7 @@ Server::dragInfoReceived(UInt32 fileNum, String content) return; } - DragInformation::parseDragInfo(m_dragFileList, fileNum, content); + DragInformation::parseDragInfo(m_fakeDragFileList, fileNum, content); - m_screen->startDraggingFiles(m_dragFileList); + m_screen->startDraggingFiles(m_fakeDragFileList); } diff --git a/src/lib/server/Server.h b/src/lib/server/Server.h index 1b3d9bb9..349b7bb3 100644 --- a/src/lib/server/Server.h +++ b/src/lib/server/Server.h @@ -175,8 +175,8 @@ public: //! Return received file data String& getReceivedFileData() { return m_receivedFileData; } - //! Return drag file list - DragFileList getDragFileList() { return m_dragFileList; } + //! Return fake drag file list + DragFileList getFakeDragFileList() { return m_fakeDragFileList; } //@} @@ -470,6 +470,7 @@ private: size_t m_expectedFileSize; String m_receivedFileData; DragFileList m_dragFileList; + DragFileList m_fakeDragFileList; Thread* m_sendFileThread; Thread* m_writeToDropDirThread; String m_dragFileExt;