Repository navigation
Commit 80f1dc3
committed
fix(diff-view): release a placeholder path another writer filled
The abandoned-stream cleanup unlinked placeholderPath on the field alone. The
field only names the path open() created empty; it is not proof that this edit
still owns the file. Another provider working the same path can write and save
approved content into it while this session still carries the field, and the
unlink then deleted that approved write outright.
The placeholder open() created is zero bytes, so the sweep now removes the file
only while it is still zero bytes. A file with content in it, and a file that is
already gone, release the ownership and leave the bytes alone, so a later
writer's approved write survives the cleanup of an abandoned session.1 parent e1d6b6c commit 80f1dc3
2 files changed
Lines changed: 38 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
757 | 757 | | |
758 | 758 | | |
759 | 759 | | |
760 | | - | |
761 | | - | |
762 | | - | |
| 760 | + | |
| 761 | + | |
| 762 | + | |
| 763 | + | |
| 764 | + | |
| 765 | + | |
| 766 | + | |
| 767 | + | |
763 | 768 | | |
764 | | - | |
765 | 769 | | |
| 770 | + | |
766 | 771 | | |
767 | 772 | | |
768 | 773 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
26 | 30 | | |
27 | 31 | | |
28 | 32 | | |
| |||
2576 | 2580 | | |
2577 | 2581 | | |
2578 | 2582 | | |
| 2583 | + | |
| 2584 | + | |
| 2585 | + | |
| 2586 | + | |
| 2587 | + | |
| 2588 | + | |
| 2589 | + | |
| 2590 | + | |
| 2591 | + | |
| 2592 | + | |
| 2593 | + | |
| 2594 | + | |
| 2595 | + | |
| 2596 | + | |
| 2597 | + | |
| 2598 | + | |
| 2599 | + | |
| 2600 | + | |
| 2601 | + | |
| 2602 | + | |
| 2603 | + | |
| 2604 | + | |
| 2605 | + | |
| 2606 | + | |
| 2607 | + | |
2579 | 2608 | | |
2580 | 2609 | | |
2581 | 2610 | | |
| |||
0 commit comments