Gnus development mailing list
 help / color / mirror / Atom feed
* gnus-uu bug?
@ 2013-12-18  7:46 Katsumi Yamaoka
  2013-12-19  4:41 ` Katsumi Yamaoka
  0 siblings, 1 reply; 2+ messages in thread
From: Katsumi Yamaoka @ 2013-12-18  7:46 UTC (permalink / raw)
  To: ding

[-- Attachment #1: Type: text/plain, Size: 995 bytes --]

Hi,

I came across many forwardxxxxxxx files left in the TMP directory.
Where xxxxxxx is a unique alphanumeric characters and TMP is a
directory that the user option `gnus-uu-tmp-dir' specifies, and
those files are all empty.  They should have been deleted, shouldn't
they?

I looked into the code and realized that such a file was created
when I forwarded two or more articles in a single message.  Whereas
other gnus-uu files are created in the `gnus-uu-work-dir' directory,
and are deleted when exiting a group.

In relation to this, `gnus-uu-decode-binhex' and
`gnus-uu-decode-binhex-view' seem to try to run without initializing
`gnus-uu-work-dir'.  I have no binhex data, so I haven't fully
tested them, though.

May I commit this patch?

2013-12-18  Katsumi Yamaoka  <yamaoka@jpl.org>

	* gnus-uu.el (gnus-uu-decode-binhex, gnus-uu-decode-binhex-view):
	Make sure work directory exists.
	(gnus-uu-digest-mail-forward): Store temporary files in work directory
	rather than tmp directory.


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: Type: text/x-patch, Size: 1289 bytes --]

--- gnus-uu.el~	2013-08-01 22:11:47.000000000 +0000
+++ gnus-uu.el	2013-12-18 07:43:09.961186100 +0000
@@ -406,6 +406,7 @@
 	  (read-directory-name "Unbinhex and save in dir: "
 			  gnus-uu-default-dir
 			  gnus-uu-default-dir))))
+  (gnus-uu-initialize)
   (setq gnus-uu-binhex-article-name
 	(mm-make-temp-file (expand-file-name "binhex" gnus-uu-work-dir)))
   (gnus-uu-decode-with-method 'gnus-uu-binhex-article n dir))
@@ -471,6 +472,7 @@
    (list current-prefix-arg
 	 (read-file-name "Unbinhex, view and save in dir: "
 			 gnus-uu-default-dir gnus-uu-default-dir)))
+  (gnus-uu-initialize)
   (setq gnus-uu-binhex-article-name
 	(mm-make-temp-file (expand-file-name "binhex" gnus-uu-work-dir)))
   (let ((gnus-view-pseudos (or gnus-view-pseudos 'automatic)))
@@ -482,8 +484,9 @@
 (defun gnus-uu-digest-mail-forward (&optional n post)
   "Digests and forwards all articles in this series."
   (interactive "P")
+  (gnus-uu-initialize)
   (let ((gnus-uu-save-in-digest t)
-	(file (mm-make-temp-file (nnheader-concat gnus-uu-tmp-dir "forward")))
+	(file (mm-make-temp-file (nnheader-concat gnus-uu-work-dir "forward")))
 	(message-forward-as-mime message-forward-as-mime)
 	(mail-parse-charset gnus-newsgroup-charset)
 	(mail-parse-ignored-charsets gnus-newsgroup-ignored-charsets)

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: gnus-uu bug?
  2013-12-18  7:46 gnus-uu bug? Katsumi Yamaoka
@ 2013-12-19  4:41 ` Katsumi Yamaoka
  0 siblings, 0 replies; 2+ messages in thread
From: Katsumi Yamaoka @ 2013-12-19  4:41 UTC (permalink / raw)
  To: ding

Katsumi Yamaoka wrote:
> I came across many forwardxxxxxxx files left in the TMP directory.
> Where xxxxxxx is a unique alphanumeric characters and TMP is a
> directory that the user option `gnus-uu-tmp-dir' specifies, and
> those files are all empty.  They should have been deleted, shouldn't
> they?

> I looked into the code and realized that such a file was created
> when I forwarded two or more articles in a single message.  Whereas
> other gnus-uu files are created in the `gnus-uu-work-dir' directory,
> and are deleted when exiting a group.

> In relation to this, `gnus-uu-decode-binhex' and
> `gnus-uu-decode-binhex-view' seem to try to run without initializing
> `gnus-uu-work-dir'.  I have no binhex data, so I haven't fully
> tested them, though.

In addition, it uses `gnus-exit-group-hook' to delete temporary
files when exiting a group, however `gnus-exit-group-hook' is not
evaluated when the group is an nnir group.  It is because nnir
uses `gnus-group-read-ephemeral-group', that sets the quit-config
parameter for the group, to create a group.  So, I've replaced
the hook with `gnus-summary-prepare-exit-hook' that is always run
by both `gnus-summary-exit' and `gnus-summary-exit-no-update'.

> May I commit this patch?

Maybe it was needless to ask people.  Committed.



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-12-19  4:41 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-12-18  7:46 gnus-uu bug? Katsumi Yamaoka
2013-12-19  4:41 ` Katsumi Yamaoka

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).