diff --git a/docs/config.rst b/docs/config.rst index 4b46f97..d8022d9 100644 --- a/docs/config.rst +++ b/docs/config.rst @@ -422,7 +422,7 @@ Local :param fileext: The file extension to use (e.g. ``.txt``). Contained in the href, so if you change the file extension after a sync, this will trigger a re-download of everything (but *should* not cause data-loss - of any kind). To be compatible with the ``vset to the empty string`` format you have + of any kind). To be compatible with the ``vset`` format you have to either use ``.vcf`` or ``.ics``. Note that metasync won't work if you use an empty string here. :param encoding: File encoding for items, both content and filename. diff --git a/vdirsyncer/storage/filesystem.py b/vdirsyncer/storage/filesystem.py index 1fd1ac6..98159ec 100644 --- a/vdirsyncer/storage/filesystem.py +++ b/vdirsyncer/storage/filesystem.py @@ -22,8 +22,15 @@ class FilesystemStorage(Storage): storage_name = "filesystem" _repr_attributes = ("path",) - def __init__(self, path, fileext, - encoding="utf-8", post_hook=None, fileignoreext=".tmp", **kwargs): + def __init__( + self, + path, + fileext, + encoding="utf-8", + post_hook=None, + fileignoreext=".tmp", + **kwargs + ): super().__init__(**kwargs) path = expand_path(path) checkdir(path, create=False) @@ -82,8 +89,11 @@ class FilesystemStorage(Storage): def list(self): for fname in os.listdir(self.path): fpath = os.path.join(self.path, fname) - if os.path.isfile(fpath) and fname.endswith(self.fileext) and ( - not fname.endswith(self.fileignoreext)): + if ( + os.path.isfile(fpath) + and fname.endswith(self.fileext) + and (not fname.endswith(self.fileignoreext)) + ): yield fname, get_etag_from_file(fpath) def get(self, href):