<feed xmlns='http://www.w3.org/2005/Atom'>
<title>django.git/tests/staticfiles_tests/project/documents/absolute_root.css, branch main</title>
<subtitle>django
</subtitle>
<id>http://cgit.adnoto.dev/django.git/atom?h=main</id>
<link rel='self' href='http://cgit.adnoto.dev/django.git/atom?h=main'/>
<link rel='alternate' type='text/html' href='http://cgit.adnoto.dev/django.git/'/>
<updated>2016-02-23T18:34:21Z</updated>
<entry>
<title>Fixed #26249 -- Fixed collectstatic crash for files in STATIC_ROOT referenced by absolute URL.</title>
<updated>2016-02-23T18:34:21Z</updated>
<author>
<name>Aymeric Augustin</name>
<email>aymeric.augustin@m4x.org</email>
</author>
<published>2016-02-20T19:54:18Z</published>
<link rel='alternate' type='text/html' href='http://cgit.adnoto.dev/django.git/commit/?id=706b33fef80b8b0901fdd2e954e5e5ea189a528a'/>
<id>urn:sha1:706b33fef80b8b0901fdd2e954e5e5ea189a528a</id>
<content type='text'>
collectstatic crashed when:

* a hashing static file storage backend was used
* a static file referenced another static file located directly in
  STATIC_ROOT (not a subdirectory) with an absolute URL (which must
  start with STATIC_URL, which cannot be empty)

It seems to me that the current code reimplements relative path joining
and doesn't handle edge cases correctly. I suspect it assumes that
STATIC_URL is of the form r'/[^/]+/'.

Throwing out that code in favor of the posixpath module makes the logic
easier to follow. Handling absolute paths correctly also becomes easier.
</content>
</entry>
</feed>
