mirror of
https://github.com/narrrl/proton-drive-linux.git
synced 2026-11-04 00:47:00 +01:00
The account run of 3.3.0 failed "move refuses a file still being written" on the on-demand to mirror pairing: pdfs move moved the folder while open.txt in it was open for writing, and the write landed after the move. retire_create re-keys a landed create's nodes row to the real uid first and repoints the tree and the open write handles after. A file opened in between holds a handle with the placeholder uid. has_pending_work_under placed each open handle by looking its uid up in the nodes table, which no longer has the placeholder, so it saw nothing open under the folder, and with the queue already empty the move went ahead. Open handles are now placed in the in-memory tree by inode, which a landing create does not change. The simulation test holds the drain at that point with the new FakeClient::hold_next_landing_of_any, and fails without the fix.