Skip to content

Commit 03aebf4

Browse files
author
Tiago Espinha
committed
Fixes using forward-slashed paths on Windows
If we define an output_filename which contains forward-slashes whilst running runserver on Windows, Django Pipeline will not find the compiled files.
1 parent 02bec0c commit 03aebf4

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

pipeline/finders.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
from django.contrib.staticfiles.finders import BaseFinder, BaseStorageFinder, find, \
55
AppDirectoriesFinder as DjangoAppDirectoriesFinder, FileSystemFinder as DjangoFileSystemFinder
66
from django.utils._os import safe_join
7+
from os.path import normpath
78

89
from pipeline.conf import settings
910

@@ -28,7 +29,7 @@ def find(self, path, all=False):
2829
"""
2930
matches = []
3031
for elem in chain(settings.STYLESHEETS.values(), settings.JAVASCRIPT.values()):
31-
if elem['output_filename'] == path:
32+
if normpath(elem['output_filename']) == normpath(path):
3233
match = safe_join(settings.PIPELINE_ROOT, path)
3334
if not all:
3435
return match

0 commit comments

Comments
 (0)