Improve: GetForegroundSelectedFiles if GetClipboardFiles failed

This commit is contained in:
yuanyuanxiang
2026-01-10 23:45:00 +01:00
parent c75b45507c
commit 7c6ee74574
14 changed files with 279 additions and 70 deletions

View File

@@ -73,7 +73,7 @@ LRESULT CDlgFileSend::OnUpdateFileProgress(WPARAM wParam, LPARAM lParam)
FileChunkPacket* pChunk = (FileChunkPacket*)lParam;
CString status;
double percent = pChunk->fileSize > 0 ? double(pChunk->offset) / pChunk->fileSize * 100.0 : 100.0;
double percent = pChunk->fileSize ? (pChunk->offset + pChunk->dataLength) * 100. / pChunk->fileSize : 100.;
m_bIsSending ?
status.Format("发送文件(%d/%d): %.2f%%", 1 + pChunk->fileIndex, pChunk->totalNum, percent):
status.Format("接收文件(%d/%d): %.2f%%", 1 + pChunk->fileIndex, pChunk->totalNum, percent);