emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] emacs-25 c1313b5: Replace colon in file name (not legal on


From: Tassilo Horn
Subject: [Emacs-diffs] emacs-25 c1313b5: Replace colon in file name (not legal on Windows)
Date: Sun, 14 Feb 2016 18:57:57 +0000

branch: emacs-25
commit c1313b5f270bb20901423815c23f72e926f7bf38
Author: Thomas Plass <address@hidden>
Commit: Tassilo Horn <address@hidden>

    Replace colon in file name (not legal on Windows)
    
    * lisp/doc-view.el (doc-view--current-cache-dir): Replace colon in file
    name (not legal on Windows). [tiny change]
---
 lisp/doc-view.el |   21 +++++++++++++--------
 1 files changed, 13 insertions(+), 8 deletions(-)

diff --git a/lisp/doc-view.el b/lisp/doc-view.el
index 06cf8dc..bc5c1d2 100644
--- a/lisp/doc-view.el
+++ b/lisp/doc-view.el
@@ -140,6 +140,7 @@
 (require 'dired)
 (require 'image-mode)
 (require 'jka-compr)
+(require 'subr-x)
 
 ;;;; Customization Options
 
@@ -695,14 +696,18 @@ It's a subdirectory of `doc-view-cache-directory'."
     (setq doc-view--current-cache-dir
          (file-name-as-directory
           (expand-file-name
-           (concat (subst-char-in-string ?% ?_ ;; bug#13679
-                     (file-name-nondirectory doc-view--buffer-file-name))
-                   "-"
-                   (let ((file doc-view--buffer-file-name))
-                     (with-temp-buffer
-                       (set-buffer-multibyte nil)
-                       (insert-file-contents-literally file)
-                       (md5 (current-buffer)))))
+           (concat (thread-last (file-name-nondirectory 
doc-view--buffer-file-name)
+                      ;; bug#13679
+                      (subst-char-in-string ?% ?_)
+                      ;; arc-mode concats archive name and file name
+                      ;; with colon which is illegal on Windows.
+                      (subst-char-in-string ?: ?_))
+                    "-"
+                    (let ((file doc-view--buffer-file-name))
+                      (with-temp-buffer
+                        (set-buffer-multibyte nil)
+                        (insert-file-contents-literally file)
+                        (md5 (current-buffer)))))
             doc-view-cache-directory)))))
 
 ;;;###autoload



reply via email to

[Prev in Thread] Current Thread [Next in Thread]