changeset 70764:0cfc01cbdd73

(w32-drag-n-drop): Substitute '/' for '\', encode, and escape file name on conversion to URL.
author YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
date Sat, 20 May 2006 04:30:46 +0000
parents e5e83c1c6fa5
children 66beff5880e7
files lisp/term/w32-win.el
diffstat 1 files changed, 8 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/term/w32-win.el	Sat May 20 04:30:07 2006 +0000
+++ b/lisp/term/w32-win.el	Sat May 20 04:30:46 2006 +0000
@@ -112,6 +112,14 @@
       (if (and (> x 0) (> y 0))
 	  (set-frame-selected-window nil window))
       (mapcar (lambda (file-name)
+		(let ((f (subst-char-in-string ?\\ ?/ file-name))
+		      (coding (or file-name-coding-system
+				  default-file-name-coding-system)))
+		  (setq file-name
+			(mapconcat 'url-hexify-string
+				   (split-string (encode-coding-string f coding)
+						 "/")
+				   "/")))
 		(dnd-handle-one-url window 'private
 				    (concat "file:" file-name)))
 		(car (cdr (cdr event)))))