Make /storage/filesystem ignore .tmp files

Hardcode to ignore files with `.tmp` suffix as this is mentioned
in the vdir specification.
This commit is contained in:
Bernhard Reiter 2021-05-19 17:51:57 +02:00
parent 804b9f0429
commit 439e63f8ea
No known key found for this signature in database
GPG key ID: 2B7BA3BF9BC3A554

View file

@ -80,7 +80,8 @@ 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):
if os.path.isfile(fpath) and fname.endswith(self.fileext) and (
not fname.endswith('.tmp')):
yield fname, get_etag_from_file(fpath)
def get(self, href):