#14998 closed (fixed)
'/'.join should use os.path.join
Reported by: | CarlFK | Owned by: | nobody |
---|---|---|---|
Component: | Contrib apps | Version: | 1.2 |
Severity: | Keywords: | ||
Cc: | Triage Stage: | Accepted | |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
http://code.djangoproject.com/browser/django/trunk/django/contrib/staticfiles/utils.py#L23
static_files = [location and '/'.join([location, fn]
Shouldn't that use os.path.join()?
Change History (4)
comment:1 by , 14 years ago
milestone: | → 1.3 |
---|---|
Triage Stage: | Unreviewed → Accepted |
comment:2 by , 14 years ago
Hm, it's actually not required since the path will be consumed by a storage class (http://code.djangoproject.com/browser/django/trunk/django/contrib/staticfiles/management/commands/collectstatic.py?rev=14592#L97) which calls os.path.normpath, converting all forward slashes to backward slashes. I agree it could be changed to always return platform specific relative paths of course, but I see this more as a cosmetic problem.
Yes.