diff --git a/radicale/storage.py b/radicale/storage.py index 5a634341..157920cd 100644 --- a/radicale/storage.py +++ b/radicale/storage.py @@ -349,7 +349,7 @@ class Collection: with open(props_path, encoding=STORAGE_ENCODING) as prop_file: properties.update(json.load(prop_file)) properties[key] = value - with open(props_path, "w", encoding=STORAGE_ENCODING) as prop_file: + with open(props_path, "w+", encoding=STORAGE_ENCODING) as prop_file: json.dump(properties, prop_file) @property