OSDN Git Service

na-get-lib,r987で仕込んでしまった0割り例外取りこぼしの対処。
authorttp <ttp@users.sourceforge.jp>
Sat, 25 Oct 2008 14:30:43 +0000 (14:30 +0000)
committerttp <ttp@users.sourceforge.jp>
Sat, 25 Oct 2008 14:30:43 +0000 (14:30 +0000)
git-svn-id: http://localhost/svn/AppliStation/trunk@989 34ed2c89-c49f-4a4b-abdb-c318350108cf

na-get-lib/NaGet.Net/Downloader.cs

index 9fab357..17dc4de 100644 (file)
@@ -277,7 +277,7 @@ public class Downloader : NaGetTask
                                        \r
                                        if (stopwatch != null && stopwatch.IsRunning && stopwatch.ElapsedMilliseconds > 3000) {\r
                                                long bpers = e.DownloadSize * 1000 / stopwatch.ElapsedMilliseconds;\r
-                                               if (e.TaskProgressPercent >= 0) {\r
+                                               if ((e.TaskProgressPercent >= 0) && (bpers > 0)) {\r
                                                        TimeSpan rest = TimeSpan.FromSeconds((max - e.DownloadSize) / bpers);\r
                                                        e.TaskMessage += string.Format(" 推定残り時間:{0} ({1}/s)", rest, NaGet.Utils.FormatSize(bpers));\r
                                                } else {\r