vdirsyncer/metasync.py: for read_only storages adjust the metadata resolution in favour of the read_only storage

This commit is contained in:
Дилян Палаузов 2022-01-14 13:07:28 +02:00
parent 54a5bf4ad3
commit 8a44b278d1

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()