Repository navigation
Commit 5f93883
committed
fix(file-safety): fall back to the link walk only on a dangling link
resolveLockKey caught every resolution error and fell back to the
bounded readlink walk, so a transient EACCES or EIO from realpath or
lstat keyed the write to the alias path while a writer reaching the
referent directly keyed the referent - two locks for one file, and the
alias/referent serialization the unit promises did not hold. Only
ENOENT (the dangling-link case the walk exists for) now falls through;
every other error propagates, matching resolvePublishTarget's own
policy. Regression test: EACCES from realpath rejects resolveLockKey
instead of returning an alias key; removing the guard reddens exactly
that test.
Also restore the rename/unlink/console spies in a finally block in the
cleanup-safety test: a failed assertion previously left the spies
active for the afterEach rm and every later test.1 parent d5a68d1 commit 5f93883
2 files changed
Lines changed: 38 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
218 | 218 | | |
219 | 219 | | |
220 | 220 | | |
221 | | - | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
222 | 229 | | |
223 | 230 | | |
224 | 231 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
159 | 159 | | |
160 | 160 | | |
161 | 161 | | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
162 | 179 | | |
163 | 180 | | |
164 | 181 | | |
| |||
175 | 192 | | |
176 | 193 | | |
177 | 194 | | |
178 | | - | |
179 | | - | |
180 | | - | |
181 | | - | |
182 | | - | |
183 | | - | |
184 | | - | |
185 | | - | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
186 | 208 | | |
0 commit comments