Commit 8f970e0
committed
Don't swallow exception on unlink failure
When our fallback unlink_file() "deletes" a file that is open elsewhere,
it is marked by Windows to be deleted when all others have closed it.
But this means that the file is still there, and rmdir() on its parent
fails. But we don't want rmtree() to "succeed" when we have leftover
directories.
Instead, we let that be an error, and rely on rmtree()'s retry loop (if
enabled) to go back and try to delete such directories.
(Assisted by Claude Code; any errors are mine.)1 parent 39c2c8a commit 8f970e0
1 file changed
Lines changed: 14 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
50 | 50 | | |
51 | 51 | | |
52 | 52 | | |
53 | | - | |
54 | | - | |
55 | | - | |
56 | | - | |
57 | 53 | | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
58 | 61 | | |
59 | 62 | | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
60 | 70 | | |
61 | 71 | | |
62 | 72 | | |
| |||
0 commit comments