Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emacs
emacs
Commits
84254bbd
Commit
84254bbd
authored
Mar 07, 2014
by
Lars Ingebrigtsen
Browse files
* gnus-agent.el (gnus-agent-update-files-total-fetched-for): Don't bug out
if the directory doesn't exist.
parent
162427fe
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
28 additions
and
21 deletions
+28
-21
lisp/gnus/ChangeLog
lisp/gnus/ChangeLog
+5
-0
lisp/gnus/gnus-agent.el
lisp/gnus/gnus-agent.el
+23
-21
No files found.
lisp/gnus/ChangeLog
View file @
84254bbd
2014-03-07 Lars Ingebrigtsen <larsi@gnus.org>
* gnus-agent.el (gnus-agent-update-files-total-fetched-for): Don't bug
out if the directory doesn't exist.
2014-03-05 Lars Ingebrigtsen <larsi@gnus.org>
* gnus-group.el (gnus-group-make-group): Clarify prompt.
...
...
lisp/gnus/gnus-agent.el
View file @
84254bbd
...
...
@@ -4121,8 +4121,8 @@ CLEAN is obsolete and ignored."
(defun gnus-agent-group-covered-p (group)
(gnus-agent-method-p (gnus-group-method group)))
(defun gnus-agent-update-files-total-fetched-for
(group delta
&optional method path)
(defun gnus-agent-update-files-total-fetched-for
(group delta
&optional method path)
"
Update,
or
set,
the
total
disk
space
used
by
the
articles
that
the
agent
has
fetched.
"
(when gnus-agent-total-fetched-hashtb
...
...
@@ -4135,27 +4135,29 @@ agent has fetched."
(gnus-sethash path (make-list 3 0)
gnus-agent-total-fetched-hashtb)))
(file-name-coding-system nnmail-pathname-coding-system))
(when (listp delta)
(if delta
(let ((sum 0.0)
(when (file-exists-p path)
(when (listp delta)
(if delta
(let ((sum 0.0)
file)
(while (setq file (pop delta))
(incf sum (float (or (nth 7 (file-attributes
(nnheader-concat
path
(if (numberp file)
(number-to-string file)
file)))) 0))))
(setq delta sum))
(let ((sum (- (nth 2 entry)))
(info (directory-files-and-attributes
path nil "
^-?[0-9]+$
" t))
file)
(while (setq file (pop delta))
(incf sum (float (or (nth 7 (file-attributes
(nnheader-concat
path
(if (numberp file)
(number-to-string file)
file)))) 0))))
(setq delta sum))
(let ((sum (- (nth 2 entry)))
(info (directory-files-and-attributes path nil "
^-?[0-9]+$
" t))
file)
(while (setq file (pop info))
(incf sum (float (or (nth 8 file) 0))))
(setq delta sum))))
(while (setq file (pop info))
(incf sum (float (or (nth 8 file) 0))))
(setq delta sum))))
(setq gnus-agent-need-update-total-fetched-for t)
(incf (nth 2 entry) delta)))))
(setq gnus-agent-need-update-total-fetched-for t)
(incf (nth 2 entry) delta)))))
)
(defun gnus-agent-update-view-total-fetched-for
(group agent-over &optional method path)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment