Commit 1c76df54 by sirex Committed by Timothée Peignier

fix FinderStorage logic. close #94 and #109

parent 1fae73c3
...@@ -86,7 +86,9 @@ class BaseFinderStorage(PipelineStorage): ...@@ -86,7 +86,9 @@ class BaseFinderStorage(PipelineStorage):
def find_storage(self, name): def find_storage(self, name):
for finder in finders.get_finders(): for finder in finders.get_finders():
for path, storage in finder.list([]): for path, storage in finder.list([]):
if path.startswith(os.path.dirname(name)): if path == name:
return storage
if os.path.splitext(path)[0] == os.path.splitext(name)[0]:
return storage return storage
return None return None
......
.third {
display: none;
}
...@@ -29,6 +29,7 @@ STATIC_ROOT = local_path('static/') ...@@ -29,6 +29,7 @@ STATIC_ROOT = local_path('static/')
STATIC_URL = '/static/' STATIC_URL = '/static/'
STATICFILES_DIRS = ( STATICFILES_DIRS = (
local_path('assets/'), local_path('assets/'),
local_path('assets2/'),
) )
STATICFILES_FINDERS = ( STATICFILES_FINDERS = (
'staticfiles.finders.FileSystemFinder', 'staticfiles.finders.FileSystemFinder',
......
...@@ -11,6 +11,7 @@ class StorageTest(TestCase): ...@@ -11,6 +11,7 @@ class StorageTest(TestCase):
'testing': { 'testing': {
'source_filenames': ( 'source_filenames': (
'css/first.css', 'css/first.css',
'css/third.css',
), ),
'manifest': False, 'manifest': False,
'output_filename': 'testing.css', 'output_filename': 'testing.css',
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment