From: Tassilo Horn Date: Sun, 16 Mar 2008 09:24:29 +0000 (+0000) Subject: (doc-view-doc->txt, doc-view-convert-current-doc): X-Git-Tag: emacs-pretest-23.0.90~7095 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=7edd6b92deefa9e64ae0b5183ca121425b7e5f44;p=emacs.git (doc-view-doc->txt, doc-view-convert-current-doc): Use non-nil PARENTS attribute of make-directory instead of explicitly checking existence the current cache directory. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index a94a2a387f1..1c4070fc14b 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,9 @@ +2008-03-16 Tassilo Horn + + * doc-view.el (doc-view-doc->txt, doc-view-convert-current-doc): + Use non-nil PARENTS attribute of make-directory instead of + explicitly checking existence the current cache directory. + 2008-03-16 Daiki Ueno * epa-file.el (epa-file-select-keys): Fix bug with C-x C-s after diff --git a/lisp/doc-view.el b/lisp/doc-view.el index 8c5fad4c3f0..156ca8c29c9 100644 --- a/lisp/doc-view.el +++ b/lisp/doc-view.el @@ -600,8 +600,7 @@ Should be invoked when the cached images aren't up-to-date." (defun doc-view-doc->txt (txt callback) "Convert the current document to text and call CALLBACK when done." - (unless (file-exists-p (doc-view-current-cache-dir)) - (make-directory (doc-view-current-cache-dir))) + (make-directory (doc-view-current-cache-dir) t) (case doc-view-doc-type (pdf ;; Doc is a PDF, so convert it to TXT @@ -650,8 +649,7 @@ Those files are saved in the directory given by the function (setq doc-view-pending-cache-flush t) (let ((png-file (expand-file-name "page-%d.png" (doc-view-current-cache-dir)))) - (unless (file-exists-p (doc-view-current-cache-dir)) - (make-directory (doc-view-current-cache-dir))) + (make-directory (doc-view-current-cache-dir) t) (case doc-view-doc-type (dvi ;; DVI files have to be converted to PDF before Ghostscript can process