GNU bug report logs - #1020
url-expand-file-name expands wrongly on Windows

Previous Next

Package: emacs;

Reported by: Klaus Straubinger <KSNetz <at> UseNet.ArcorNews.DE>

Date: Wed, 24 Sep 2008 12:30:03 UTC

Severity: normal

Done: Jason Rumney <jasonr <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (Emacs bug Tracking System)
To: Klaus Straubinger <KSNetz <at> UseNet.ArcorNews.DE>
Subject: bug#1020 closed by Jason Rumney <jasonr <at> gnu.org> (Re: bug#1020: 
 url-default-expander expands wrongly on Windows)
Date: Sat, 21 Feb 2009 08:10:04 +0000
[Message part 1 (text/plain, inline)]
This is an automatic notification regarding your bug report
which was filed against the emacs,url package:

#1020: url-expand-file-name expands wrongly on Windows

It has been closed by Jason Rumney <jasonr <at> gnu.org>.

Their explanation is attached below along with your original report.
If this explanation is unsatisfactory and you have not received a
better one in a separate message then please contact Jason Rumney <jasonr <at> gnu.org> by
replying to this email.


-- 
1020: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=1020
Emacs Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Jason Rumney <jasonr <at> gnu.org>
To: Juanma Barranquero <lekktu <at> gmail.com>,
        1020-done <at> debbugs.gnu.org
Cc: Klaus Straubinger <KSNetz <at> usenet.arcornews.de>
Subject: Re: bug#1020: url-default-expander expands wrongly on Windows
Date: Sat, 21 Feb 2009 16:00:03 +0800
Juanma Barranquero wrote:
>>> the function url-default-expander calls expand-file-name which
>>> inserts interesting but wrong drive letters into URLs when called
>>> on Windows.
>>>       
> ELISP> (url-expand-file-name "test" "http://www.gnu.org/")
> "http://www.gnu.org/c:/test"
> ELISP> (url-expand-file-name "test" "http://www.gnu.org")
> "http://www.gnu.org/c:/emacs/lisp/url/test"
> ELISP> (url-expand-file-name "/test" "http://www.gnu.org/")
> "http://www.gnu.org/test"
> ELISP> (url-expand-file-name "/test" "http://www.gnu.org")
> "http://www.gnu.org/test"
>   

I have changed url-default-expand to use concat instead of 
expand-file-name to avoid this bug.


[Message part 3 (message/rfc822, inline)]
From: Klaus Straubinger <KSNetz <at> UseNet.ArcorNews.DE>
To: bug-gnu-emacs <at> gnu.org
Subject: url-expand-file-name expands wrongly on Windows
Date: Wed, 24 Sep 2008 14:19:34 +0200 ()
In GNU Emacs 22.3.1 (i386-mingw-nt5.1.2600)
 of 2008-09-06 on SOFT-MJASON
Windowing system distributor `Microsoft Corp.', version 5.1.2600
configured using `configure --with-gcc (3.4)'

the problem described in
<http://lists.gnu.org/archive/html/bug-gnu-emacs/2008-03/msg00123.html>
still occurs.

  (url-expand-file-name "test" ["http" nil nil "www.gnu.org" 80 "/" nil nil t])

  --> "http://www.gnu.org/c:/test";


  (url-http-expand-file-name
   [nil nil nil nil nil "test" nil nil nil]
   ["http" nil nil "www.gnu.org" 80 "/" nil nil t])

  --> "/c:/test"

url-http-expand-file-name is an alias for url-default-expander; this
could be changed.

But currently the function url-default-expander calls the function
expand-file-name while canonicalizing URLs. This is not a good idea on
Windows because there the drive letter will be inserted.




This bug report was last modified 15 years and 246 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.