Skip non-directories during filesystem discovery

This commit is contained in:
Markus Unterwaditzer 2014-11-30 16:02:01 +01:00
parent 11919ef30d
commit 29f9a10766

View file

@ -54,6 +54,7 @@ class FilesystemStorage(Storage):
raise TypeError('collection argument must not be given.')
path = expand_path(path)
for collection in os.listdir(path):
if os.path.isdir(os.path.join(path, collection)):
s = cls(path=path, collection=collection, **kwargs)
yield s