diff --git a/feiqlib/feiqengine.cpp b/feiqlib/feiqengine.cpp index 7b99ad2..28ab95d 100644 --- a/feiqlib/feiqengine.cpp +++ b/feiqlib/feiqengine.cpp @@ -69,7 +69,9 @@ public: <modifyTime <fileType; + <fileType + <packetNo = stoul(post->packetNo); if (content != nullptr) + { + content->packetNo = stoul(post->packetNo); post->contents.push_back(shared_ptr(std::move(content))); + } found = ++endTask; } @@ -610,6 +614,7 @@ bool FeiqEngine::downloadFile(FileTask* task) } fclose(of); + task->setProcess(total); task->setState(FileTaskState::Finish); }; diff --git a/feiqlib/filetask.cpp b/feiqlib/filetask.cpp index 85ec36d..64b2846 100644 --- a/feiqlib/filetask.cpp +++ b/feiqlib/filetask.cpp @@ -22,7 +22,8 @@ void FileTask::setObserver(IFileTaskObserver *observer) void FileTask::setProcess(int val) { mProcess = val; - if (mProcess - mLastProcess >= mNotifySize) + if (mProcess - mLastProcess >= mNotifySize + || mProcess >= mContent->size) { mLastProcess = mProcess; mObserver->onProgress(this); diff --git a/feiqlib/ipmsg.h b/feiqlib/ipmsg.h index 5d4f908..c1a149e 100644 --- a/feiqlib/ipmsg.h +++ b/feiqlib/ipmsg.h @@ -129,7 +129,7 @@ #define IPMSG_FILE_ALIASFNAME 0x00000040 // alias fname #define IPMSG_FILE_UNICODEFNAME 0x00000041 // UNICODE fname -#define FILELIST_SEPARATOR 0x7 +#define FILELIST_SEPARATOR (char)0x7 #define HOSTLIST_DUMMY (char)0x8 #define HLIST_ENTRY_SEPARATOR (char)0x3a