cyberdelia/django-pipeline — Issue #55: Problem with folder wildcards when files in parent folder
Author: jjaksic
Created: 2011-12-14 02:37:16+00:00
State: open

Say you have your pipeline set up to look for sources in any of the subfolders of the given path, e.g. "js/*/*.js".
This works well when there are no files in the "js" folder, but it breaks when the folder also contains files.
The cause is in pipeline.glob.
glob1 returns a combined list of all the files and directories. iglob uses this list to scan folders recursively when it needs to. The problem is that it executes glob1 on files as well as folders, and glob1 causes an exception when attempted to run on non-folders.