diff lisp/gnus/gnus-uu.el @ 2:ac2d302a0011 r19-15b2

Import from CVS: tag r19-15b2
author cvs
date Mon, 13 Aug 2007 08:46:35 +0200
parents 376386a54a3c
children 0293115a14e9
line wrap: on
line diff
--- a/lisp/gnus/gnus-uu.el	Mon Aug 13 08:45:53 2007 +0200
+++ b/lisp/gnus/gnus-uu.el	Mon Aug 13 08:46:35 2007 +0200
@@ -563,7 +563,7 @@
 	(data gnus-newsgroup-data))
     (save-excursion
       (while data
-	(when (> (or (cdr (assq (gnus-data-number (caar data))
+	(when (> (or (cdr (assq (gnus-data-number (car data))
 				gnus-newsgroup-scored))
 		     gnus-summary-default-score 0)
 		 score)
@@ -1092,7 +1092,7 @@
 ;;   If the list returned contains a `begin', the first element of
 ;;   the list *must* be a string with the file name of the decoded
 ;;   file.
-;; `end' if the the end of an encoded file has been received
+;; `end' if the end of an encoded file has been received
 ;; `middle' if the article was a body part of an encoded file
 ;; `wrong-type' if the article was not a part of an encoded file
 ;; `ok', which can be used everything is ok
@@ -1314,12 +1314,18 @@
 	    (gnus-uu-unmark-list-of-grabbed t))
 
 	  ;; Start a new uudecoding process.
-	  (setq gnus-uu-uudecode-process
-		(start-process 
-		 "*uudecode*" 
-		 (get-buffer-create gnus-uu-output-buffer-name)
-		 shell-file-name shell-command-switch
-		 (format "cd %s ; uudecode" gnus-uu-work-dir)))
+	  (let ((cdir default-directory))
+	    (unwind-protect
+		(progn
+		  (cd gnus-uu-work-dir)
+		  (setq gnus-uu-uudecode-process
+			(start-process 
+			 "*uudecode*" 
+			 (get-buffer-create gnus-uu-output-buffer-name)
+			 shell-file-name shell-command-switch
+			 (format "cd %s %s uudecode" gnus-uu-work-dir
+				 gnus-shell-command-separator))))
+	      (cd cdir)))
 	  (set-process-sentinel 
 	   gnus-uu-uudecode-process 'gnus-uu-uudecode-sentinel)
 	  (setq state (list 'begin))
@@ -1584,7 +1590,7 @@
 
 ;; Kills the temporary uu buffers, kills any processes, etc.
 (defun gnus-uu-clean-up ()
-  (let (buf pst)
+  (let (buf)
     (and gnus-uu-uudecode-process
 	 (memq (process-status (or gnus-uu-uudecode-process "nevair"))
 	       '(stop run))