# HG changeset patch # User Tassilo Horn # Date 1205659442 0 # Node ID c378e060aab39dadb5ee45db6ab83fdc627d21b7 # Parent d22a1707eab3ef87d5fababae0b717d0a64d1af0 (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 -r d22a1707eab3 -r c378e060aab3 lisp/doc-view.el --- a/lisp/doc-view.el Sun Mar 16 04:05:03 2008 +0000 +++ b/lisp/doc-view.el Sun Mar 16 09:24:02 2008 +0000 @@ -600,8 +600,7 @@ (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 @@ (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