MCPcopy
hub / github.com/jgraph/drawio-desktop / blessPath

Function blessPath

src/main/electron.js:256–274  ·  view source on GitHub ↗
(p)

Source from the content-addressed store, hash-verified

254}
255
256function 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

Callers 5

migrateLegacyRecentsOnceFunction · 0.85
loadFinishedFunction · 0.85
electron.jsFile · 0.85
showOpenDialogFunction · 0.85
showSaveDialogFunction · 0.85

Calls 1

persistBlessedPathsFunction · 0.85

Tested by

no test coverage detected