Skip to content

Commit

Permalink
Fixes using forward-slashed paths on Windows
Browse files Browse the repository at this point in the history
If we define an output_filename which contains forward-slashes
whilst running runserver on Windows, Django Pipeline will not
find the compiled files.
  • Loading branch information
Tiago Espinha committed Apr 16, 2016
1 parent 02bec0c commit 03aebf4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pipeline/finders.py
Expand Up @@ -4,6 +4,7 @@
from django.contrib.staticfiles.finders import BaseFinder, BaseStorageFinder, find, \
AppDirectoriesFinder as DjangoAppDirectoriesFinder, FileSystemFinder as DjangoFileSystemFinder
from django.utils._os import safe_join
from os.path import normpath

from pipeline.conf import settings

Expand All @@ -28,7 +29,7 @@ def find(self, path, all=False):
"""
matches = []
for elem in chain(settings.STYLESHEETS.values(), settings.JAVASCRIPT.values()):
if elem['output_filename'] == path:
if normpath(elem['output_filename']) == normpath(path):
match = safe_join(settings.PIPELINE_ROOT, path)
if not all:
return match
Expand Down

0 comments on commit 03aebf4

Please sign in to comment.