Commit f42cf5f
committed
perf(ipc): pass force: true to safeDelete for tmpdir files
Optimize safeDelete calls in IPC cleanup by passing { force: true }
since IPC stub files are always in os.tmpdir()/.socket-ipc/. This skips
unnecessary path validation checks that would otherwise:
1. Load os, path, and paths modules
2. Resolve tmpdir, cacache, and socketUserDir
3. Check each file path against all allowed directories
This is especially beneficial in cleanupIpcStubs which processes
multiple files in Promise.all(), where each file would trigger
these checks independently without force: true.1 parent eb2eb5f commit f42cf5f
1 file changed
+4
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
328 | 328 | | |
329 | 329 | | |
330 | 330 | | |
331 | | - | |
332 | | - | |
| 331 | + | |
| 332 | + | |
333 | 333 | | |
334 | 334 | | |
335 | 335 | | |
| |||
395 | 395 | | |
396 | 396 | | |
397 | 397 | | |
398 | | - | |
| 398 | + | |
| 399 | + | |
399 | 400 | | |
400 | 401 | | |
401 | 402 | | |
| |||
0 commit comments