Merge pull request #961 from dilyanpalauzov/readonly_metadata

vdirsyncer/metasync.py: for read_only storages adjust the metadata resolution in favour of the read_only storage
This commit is contained in:
Hugo Osvaldo Barrera 2022-01-14 16:39:23 +01:00 committed by GitHub
commit e8b72130c2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -55,7 +55,7 @@ async def metasync(storage_a, storage_b, status, keys, conflict_resolution=None)
logger.debug(f"B: {b}")
logger.debug(f"S: {s}")
if a != s and b != s:
if a != s and b != s or storage_a.read_only or storage_b.read_only:
await _resolve_conflict()
elif a != s and b == s:
await _a_to_b()