Opened 13 years ago

Closed 13 years ago

Last modified 13 years ago

#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 Russell Keith-Magee, 13 years ago

milestone: 1.3
Triage Stage: UnreviewedAccepted

Yes.

comment:2 by Jannis Leidel, 13 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.

comment:3 by Alex Gaynor, 13 years ago

Resolution: fixed
Status: newclosed

Fixed in [15128].

comment:4 by Jacob, 13 years ago

milestone: 1.3

Milestone 1.3 deleted

Note: See TracTickets for help on using tickets.
Back to Top