(p)
| 254 | } |
| 255 | |
| 256 | function blessPath(p) |
| 257 | { |
| 258 | if (typeof p !== 'string' || !p) return; |
| 259 | |
| 260 | try |
| 261 | { |
| 262 | const resolved = path.resolve(p); |
| 263 | blessedPaths.add(resolved); |
| 264 | |
| 265 | try |
| 266 | { |
| 267 | blessedPaths.add(fs.realpathSync(resolved)); |
| 268 | } |
| 269 | catch (e) {} // Path may not exist yet (Save As) — that's fine. |
| 270 | |
| 271 | persistBlessedPaths(); |
| 272 | } |
| 273 | catch (e) {} // Defensive: blessPath must never throw into a caller's flow. |
| 274 | } |
| 275 | |
| 276 | // One-shot migration: on first launch with the blessedPaths fix, the renderer's |
| 277 | // drawio "Open Recent" list (in localStorage at key '.recent') contains paths |
no test coverage detected