mirror of
https://github.com/narrrl/proton-drive-linux.git
synced 2026-12-03 20:41:50 +01:00
A mirror edit read the file's node before each upload to make sure no other client had committed a revision since the pass looked (B249). The SDK then read the same link again for the content key and the revision id. proton-drive-rs 0.12.8 adds upload_new_revision_over, which makes that check with its own read and creates the revision over the expected one. The mirror now uses it whenever it knows the revision it saw, and keeps the separate read only for rows without one. 0.12.8 also caches a folder's hash key, so a second upload into the same folder reads none of its keys again. The fake drive answers upload_new_revision_over with Moved, Trashed or Sealed, and honors hold_next_read, so the B249 sim still covers the race.