Skip to content

Commit 439e63f

Browse files
Make /storage/filesystem ignore .tmp files
Hardcode to ignore files with `.tmp` suffix as this is mentioned in the vdir specification.
1 parent 804b9f0 commit 439e63f

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

vdirsyncer/storage/filesystem.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,8 @@ def _get_href(self, ident):
8080
def list(self):
8181
for fname in os.listdir(self.path):
8282
fpath = os.path.join(self.path, fname)
83-
if os.path.isfile(fpath) and fname.endswith(self.fileext):
83+
if os.path.isfile(fpath) and fname.endswith(self.fileext) and (
84+
not fname.endswith('.tmp')):
8485
yield fname, get_etag_from_file(fpath)
8586

8687
def get(self, href):

0 commit comments

Comments
 (0)