comparison src/gtk/transfer.c @ 602:89216879202f

2004-11-1 Brian Masney <masneyb@gftp.org> * src/gtk/transfer.c (update_file_status) - if the % transferred goes over 100%, then set the update string to unknown percentage transfered. This will occur whenever the reported transfer size is different than what is actually being transfered. This occurs whenever a symlink is being transfered
author masneyb
date Tue, 02 Nov 2004 00:19:09 +0000
parents b497d05cb591
children 07dc89f95076
comparison
equal deleted inserted replaced
601:0e4ca3c8b9cf 602:89216879202f
719 if ((double) tdata->total_bytes > 0) 719 if ((double) tdata->total_bytes > 0)
720 pcent = (int) ((double) (tdata->trans_bytes + tdata->resumed_bytes) / (double) tdata->total_bytes * 100.0); 720 pcent = (int) ((double) (tdata->trans_bytes + tdata->resumed_bytes) / (double) tdata->total_bytes * 100.0);
721 else 721 else
722 pcent = 0; 722 pcent = 0;
723 723
724 g_snprintf (totstr, sizeof (totstr), 724 if (pcent > 100)
725 g_snprintf (totstr, sizeof (totstr),
726 _("Unknown percentage complete. (File %ld of %ld)"),
727 tdata->current_file_number, tdata->numdirs + tdata->numfiles);
728 else
729 g_snprintf (totstr, sizeof (totstr),
725 _("%d%% complete, %02d:%02d:%02d est. time remaining. (File %ld of %ld)"), 730 _("%d%% complete, %02d:%02d:%02d est. time remaining. (File %ld of %ld)"),
726 pcent, hours, mins, secs, tdata->current_file_number, 731 pcent, hours, mins, secs, tdata->current_file_number,
727 tdata->numdirs + tdata->numfiles); 732 tdata->numdirs + tdata->numfiles);
728 733
729 *dlstr = '\0'; 734 *dlstr = '\0';