1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2025-01-20 18:17:20 +00:00

(mh-x-image-url-cache-canonicalize): Add `*' to reserved Windows

filename characters (closes SF #1396499).
This commit is contained in:
Bill Wohler 2006-11-14 06:30:50 +00:00
parent 1b5929b989
commit ff4dd1991d
2 changed files with 14 additions and 7 deletions

View File

@ -1,3 +1,8 @@
2006-11-14 Bill Wohler <wohler@newt.com>
* mh-xface.el (mh-x-image-url-cache-canonicalize): Add `*' to
reserved Windows filename characters (closes SF #1396499).
2006-11-13 Bill Wohler <wohler@newt.com>
Release MH-E version 8.0.3.

View File

@ -361,14 +361,16 @@ This is only done if `mh-x-image-cache-directory' is nil."
Replace the ?/ character with a ?! character and append .png.
Also replaces special characters with `mh-url-hexify-string'
since not all characters, such as :, are legal within Windows
filenames. See URL
`http://msdn.microsoft.com/library/default.asp?url=/library/en-us/fileio/fs/naming_a_file.asp'."
filenames. In addition, replaces * with %2a. See URL
`http://msdn.microsoft.com/library/default.asp?url=/library/en-us/shellcc/platform/shell/reference/ifaces/iitemnamelimits/GetValidCharacters.asp'."
(format "%s/%s.png" mh-x-image-cache-directory
(mh-url-hexify-string
(with-temp-buffer
(insert url)
(mh-replace-string "/" "!")
(buffer-string)))))
(mh-replace-regexp-in-string
"\*" "%2a"
(mh-url-hexify-string
(with-temp-buffer
(insert url)
(mh-replace-string "/" "!")
(buffer-string))))))
(defun mh-x-image-get-download-state (file)
"Check the state of FILE by following any symbolic links."