mirror of
https://github.com/narrrl/proton-drive-linux.git
synced 2026-11-04 16:56:59 +01:00
fix(core): a file renamed just as its create lands keeps its access (B174)
This commit is contained in:
1 parent
378667fb37
commit
1612a9d07a
5 files changed
+83
-4
No files matched your search
@@ -12,6 +12,27 @@ Conventions:
|
||||
|
||||
---
|
||||
|
||||
## B174 — A file renamed just as its create lands is refused with "Permission denied"
|
||||
|
||||
**Status:** Fixed (unverified).
|
||||
**Found:** 2026-10-04, by the simulation suite on 378667f (`one_client_on_a_good_link`, seed 6):
|
||||
`rename c.bin -> b.txt` answered `EACCES` right after a settle. Not reproduced in three replays.
|
||||
|
||||
**Where:** `Db::effective_node_access` in `crates/pdfs-core/src/db/share_access.rs`.
|
||||
|
||||
**Cause.** Every change on the mount first asks whether the node may be written, and a node
|
||||
with no row is refused. When a create lands, its row takes the uid Drive gave it before the
|
||||
tree does (B173's gap). A rename in between asked by the stand-in the tree still had, found no
|
||||
row under it, and was refused.
|
||||
|
||||
**Fix.** A stand-in is looked up by its local id, so it finds its row before and after the
|
||||
create lands.
|
||||
|
||||
**Test:** `a_stand_in_keeps_its_access_once_its_create_has_landed` in
|
||||
`crates/pdfs-core/src/db/tests.rs`.
|
||||
|
||||
---
|
||||
|
||||
## B173 — A file deleted just as its create lands stays on Drive
|
||||
|
||||
**Status:** Fixed (unverified).
|
||||
|
||||
@@ -74,6 +74,8 @@ by its local id, in the queue, the stored tree and pins alike.
|
||||
longer waits for the upload's next retry (B171).
|
||||
- **A file deleted just as it reached Drive is removed from Drive too.** It no longer stayed
|
||||
there, and the next file with that name no longer became a conflict copy (B173).
|
||||
- **Renaming a file just as it reaches Drive no longer fails with "Permission denied"**
|
||||
(B174).
|
||||
- **A file renamed just as its upload finished keeps its new name.** The mount no longer showed
|
||||
the old name, and a second rename no longer failed with "No such file or directory" (B152,
|
||||
B172).
|
||||
|
||||
@@ -9,7 +9,7 @@ Tracks `docs/MILESTONE-3.0.0.md`. Update it with every commit that moves a phase
|
||||
- **Phase 2**: local ids, inode = local id, one tree for every mount (2.10.0).
|
||||
- **Phase 3, first part**: mkdir, create, rename, unlink and rmdir on the mount are recorded
|
||||
locally and sent from the queue; `"local_first": false` brings back the old path (5e0f30c).
|
||||
- Fixes from the simulation and account runs since then: B127 and B141 to B173.
|
||||
- Fixes from the simulation and account runs since then: B127 and B141 to B174.
|
||||
- **Sync issues, first cut** (§6.2): refusals sorted into issues, shown at once in the app,
|
||||
tray and CLI; Export button and `pdfs sync export`; `pdfs sync issues`.
|
||||
|
||||
@@ -117,7 +117,8 @@ Tracks `docs/MILESTONE-3.0.0.md`. Update it with every commit that moves a phase
|
||||
fixed). Run three at a time on 2502af6, seed 8 failed two of nine runs: a file renamed
|
||||
while its upload was read back showed its old name again (B172, fixed). The loop
|
||||
on d850265 failed seed 12 once in nine runs: a file deleted just as its create
|
||||
landed stayed on Drive (B173, fixed).
|
||||
landed stayed on Drive (B173, fixed). The suite on 378667f failed seed 6: a rename
|
||||
in the same gap was refused with `EACCES` (B174, fixed).
|
||||
5. **Release**: 2.10.0 is tagged; the 2.9.0 tag still waits for the user's go-ahead.
|
||||
|
||||
## After 3.0.0
|
||||
|
||||
Reference in new issue
Block a user