Subject: Re: bug#6339: url-filename => "/c:/some/file.txt"

From: Lars Magne Ingebrigtsen <[email-masked]>
Date: Wed, 21 Sep 2011 22:28:17 +0200

Juanma Barranquero <[email-masked]> writes:

> On Thu, Jun 3, 2010 at 04:38, Lennart Borgman <[email-masked]> wrote:
>
>> (setq x (url-generic-parse-url "file:///c:/some/file.txt"))
>> (url-filename x) => "/c:/some/file.txt"
>>
>> Should not that be "c:/some/file.txt"?

[...]

> I'd rather fix it the good way and watch the fireworks.
>
>     Juanma
>
> === modified file 'lisp/url/url-parse.el'
> --- lisp/url/url-parse.el	2010-06-22 16:48:53 +0000
> +++ lisp/url/url-parse.el	2010-07-26 11:46:11 +0000
> @@ -148,4 +148,5 @@
>            ;; 3.3. Path
> +	  (when (looking-at "/") (forward-char 1))
>            ;; Gross hack to preserve ';' in data URLs
>            (setq save-pos (point))

If I say:

(setq x (url-generic-parse-url "file:///home/larsi/foo.txt"))

Then I get

(url-filename x)
=> "/home/larsi/foo.txt"

as expected.  Would your patch break that?

-- 
(domestic pets only, the antidote for overdose, milk.)
  bloggy blog http://lars.ingebrigtsen.no/