mirror of
https://github.com/samsonjs/vdirsyncer.git
synced 2026-04-27 14:57:41 +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.')
|
raise TypeError('collection argument must not be given.')
|
||||||
path = expand_path(path)
|
path = expand_path(path)
|
||||||
for collection in os.listdir(path):
|
for collection in os.listdir(path):
|
||||||
s = cls(path=path, collection=collection, **kwargs)
|
if os.path.isdir(os.path.join(path, collection)):
|
||||||
yield s
|
s = cls(path=path, collection=collection, **kwargs)
|
||||||
|
yield s
|
||||||
|
|
||||||
def _get_filepath(self, href):
|
def _get_filepath(self, href):
|
||||||
return os.path.join(self.path, href)
|
return os.path.join(self.path, href)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue