From: ueno Date: Fri, 15 Sep 2006 03:36:36 +0000 (+0000) Subject: Avoid div-by-zero error. X-Git-Tag: epg-0_0_6~21 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=27e1a3701e39063f274a602cf65161d854ba59da;p=elisp%2Fepg.git Avoid div-by-zero error. --- diff --git a/epg.el b/epg.el index 82ce61e..6ba12fe 100644 --- a/epg.el +++ b/epg.el @@ -1305,7 +1305,8 @@ This function is for internal use only." (defun epg-progress-callback-function (context what char current total handback) - (message "%s: %d%% (%d/%d)" what (/ current 1.0 total) current total)) + (message "%s: %d%% (%d/%d)" what (if (> total 0) (/ current 1.0 total) 0) + current total)) (defun epg--list-keys-1 (context name mode) (let ((args (append (if epg-gpg-home-directory