#256 drive letter in css path on windows

repository
closed-fixed
nobody
None
5
2015-01-15
2014-06-08
engelbert gruber
No

testing on windows 7::

  stylesheet = """\
- <link rel="stylesheet" href="/test.css" type="text/css" />"""
+ <link rel="stylesheet" href="C:/test.css" type="text/css" />"""
?                              ++

that is: if a stylesheet is specified with an absolute path, utils.relative_path calls os.path.abspath which on windows prepends the drive letter.

I cannot find a use case where the driveletter is useful.

So for stylesheets the driveletter should be not prepended, but also not removed.

Discussion

  • absolute path "/test.css" to me is maybe useful when viewed from a webserver,
    but not when viewed on local filesystem.

    Therefore RFC

     
    • status: open --> pending-remind
     
  • happens in utils.relative_path, os.path.abspath prepends the driveletter

     
    • Description has changed:

    Diff:

    --- old
    +++ new
    @@ -4,3 +4,10 @@
         - <link rel="stylesheet" href="/test.css" type="text/css" />"""
         + <link rel="stylesheet" href="C:/test.css" type="text/css" />"""
         ?                              ++
    +
    +that is: if a stylesheet is specified with an absolute path, utils.relative_path calls os.path.abspath which on windows prepends the drive letter.
    +
    +I cannot find a use case where the driveletter is useful.
    +
    +So for stylesheets the driveletter should be not prepended, but also not removed.
    +
    
     
    • status: pending-remind --> closed-fixed
     
  • changed the test not the code