aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/mh-e/mh-xface.el
diff options
context:
space:
mode:
authorBill Wohler <[email protected]>2006-11-14 06:30:50 +0000
committerBill Wohler <[email protected]>2006-11-14 06:30:50 +0000
commitff4dd1991d5f4cb0ffc0bf52e87072a5c01c98f8 (patch)
tree226416c8bb9b032a2dc5b0ec864b8a3b322f9290 /lisp/mh-e/mh-xface.el
parent1b5929b9895e90b16205591f5cb573328c911a5d (diff)
(mh-x-image-url-cache-canonicalize): Add `*' to reserved Windows
filename characters (closes SF #1396499).
Diffstat (limited to 'lisp/mh-e/mh-xface.el')
-rw-r--r--lisp/mh-e/mh-xface.el16
1 files changed, 9 insertions, 7 deletions
diff --git a/lisp/mh-e/mh-xface.el b/lisp/mh-e/mh-xface.el
index deb2cebad1..e6da73339c 100644
--- a/lisp/mh-e/mh-xface.el
+++ b/lisp/mh-e/mh-xface.el
@@ -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."