From 7d3e76180f8f5afc63ab21e2a9812e9df28946c4 Mon Sep 17 00:00:00 2001 From: chrisz Date: Tue, 2 Sep 2003 18:41:44 +0000 Subject: [PATCH] bytes_xfer svn path=/trunk/boinc/; revision=2218 --- client/win/wingui_mainwindow.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/client/win/wingui_mainwindow.cpp b/client/win/wingui_mainwindow.cpp index f0f2dbb484..3c09985229 100755 --- a/client/win/wingui_mainwindow.cpp +++ b/client/win/wingui_mainwindow.cpp @@ -469,10 +469,18 @@ void CMainWindow::UpdateGUI(CLIENT_STATE* pcs) m_XferListCtrl.SetItemText(i, 1, pfx->fip->name); // progress - double xSent = 0; + double xSent = 0, f_size; + char pathnm[256]; if (pfx->fxp) { xSent = pfx->fxp->bytes_xferred; } + else { + get_pathname(pfx->fip, pathnm); + if (file_size(pathnm, f_size)) { + f_size = 0; + } + xSent = f_size; + } // if (m_XferListCtrl.GetItemProgress(i, 2) != 100 * xSent / pfx->fip->nbytes) m_XferListCtrl.SetItemProgress(i, 2, 100 * xSent / pfx->fip->nbytes);