changeset 93004:c378e060aab3

(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.
author Tassilo Horn <tassilo@member.fsf.org>
date Sun, 16 Mar 2008 09:24:02 +0000
parents d22a1707eab3
children e947a4888267
files lisp/doc-view.el
diffstat 1 files changed, 2 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- 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