mirror of
https://github.com/samsonjs/vdirsyncer.git
synced 2026-03-30 09:45:53 +00:00
Skip non-directories during filesystem discovery
This commit is contained in:
parent
11919ef30d
commit
29f9a10766
1 changed files with 3 additions and 2 deletions
|
|
@ -54,8 +54,9 @@ class FilesystemStorage(Storage):
|
|||
raise TypeError('collection argument must not be given.')
|
||||
path = expand_path(path)
|
||||
for collection in os.listdir(path):
|
||||
s = cls(path=path, collection=collection, **kwargs)
|
||||
yield s
|
||||
if os.path.isdir(os.path.join(path, collection)):
|
||||
s = cls(path=path, collection=collection, **kwargs)
|
||||
yield s
|
||||
|
||||
def _get_filepath(self, href):
|
||||
return os.path.join(self.path, href)
|
||||
|
|
|
|||
Loading…
Reference in a new issue