mirror of
https://github.com/narrrl/proton-drive-linux.git
synced 2026-11-03 16:41:26 +01:00
`Core` held a concrete `ProtonDriveClient`, so no test could make Drive answer late, answer stale or not answer. This is the first step of phase 0 in docs/MILESTONE-3.0.0.md. `DriveApi` (`crates/pdfs-fuse/src/drive.rs`) covers the calls the sync core makes: listings, events, creates, uploads, downloads, renames, moves, trashes and restores. `ProtonDriveClient` implements it by forwarding. `Core::drive` holds it, and every call of those methods now goes through it. Sharing, Photos, devices, invitations and public links stay on `Core::client`. The trait takes readers and writers as trait objects, and `impl dyn DriveApi` puts the client's generic signatures back, so call sites read the same. Block reads go through `RevisionRead` instead of the SDK's `RevisionReader`, which only the SDK can construct. No behaviour change.