Avoid file-name errors when viewing PDF from Gnus
* lisp/doc-view.el (doc-view-mode): Run the output file name through 'convert-standard-filename', to avoid problems with characters that are not allowed in file names on some systems. (Bug#32989) Copyright-paperwork-exempt: yes
This commit is contained in:
parent
c9390423d6
commit
88ef31abd4
1 changed files with 22 additions and 21 deletions
|
@ -1772,6 +1772,7 @@ toggle between displaying the document or editing it as text.
|
|||
(doc-view-make-safe-dir doc-view-cache-directory)
|
||||
;; Handle compressed files, remote files, files inside archives
|
||||
(setq-local doc-view--buffer-file-name
|
||||
(convert-standard-filename
|
||||
(cond
|
||||
(jka-compr-really-do-compress
|
||||
;; FIXME: there's a risk of name conflicts here.
|
||||
|
@ -1792,7 +1793,7 @@ toggle between displaying the document or editing it as text.
|
|||
(file-name-nondirectory buffer-file-name)
|
||||
(buffer-name))
|
||||
doc-view-cache-directory))
|
||||
(t buffer-file-name)))
|
||||
(t buffer-file-name))))
|
||||
(when (not (string= doc-view--buffer-file-name buffer-file-name))
|
||||
(write-region nil nil doc-view--buffer-file-name))
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue