MCPcopy Create free account
hub / github.com/TechJeeper/Printventory / removeNonExistentFiles

Function removeNonExistentFiles

main.js:2584–2742  ·  view source on GitHub ↗
(scanDirectoryPath, window = null)

Source from the content-addressed store, hash-verified

2582 await shell.openExternal('https://discord.gg/JXcZHT77ua');
2583 }
2584 },
2585 {
2586 label: 'Patreon',
2587 click: async () => {
2588 await shell.openExternal('https://patreon.com/Printventory');
2589 }
2590 },
2591 {
2592 label: 'Support Printventory',
2593 click: async () => {
2594 await shell.openExternal('https://printventory.com/support.html');
2595 }
2596 },
2597 {
2598 label: 'GitHub',
2599 click: async () => {
2600 await shell.openExternal('https://github.com/TechJeeper/Printventory');
2601 }
2602 },
2603 { type: 'separator' },
2604 {
2605 label: 'Library Stats',
2606 click: () => {
2607 mainWindow.webContents.send('open-stats');
2608 }
2609 },
2610 ...(isServerMode ? [{
2611 label: 'System Report',
2612 click: () => {
2613 mainWindow.webContents.send('open-system-report');
2614 }
2615 }] : []),
2616 {
2617 label: 'Server Mode Info',
2618 click: async () => {
2619 await shell.openExternal('https://github.com/TechJeeper/Printventory?tab=readme-ov-file#server-mode');
2620 }
2621 },
2622 {
2623 label: 'Debug Console',
2624 click: () => mainWindow.webContents.openDevTools()
2625 }
2626 ]
2627 }
2628 ];
2629
2630 const menu = Menu.buildFromTemplate(template);
2631 Menu.setApplicationMenu(menu);
2632
2633 // Register before loadURL — localhost static server can finish before await returns,
2634 // so attaching ready-to-show after loadURL misses the event and the window stays hidden.
2635 let mainWindowShown = false;
2636 const showMainWindowWhenReady = () => {
2637 if (mainWindowShown || !mainWindow || mainWindow.isDestroyed()) return;
2638 mainWindowShown = true;
2639 mainWindow.show();
2640 };
2641 mainWindow.once('ready-to-show', showMainWindowWhenReady);

Callers 1

main.jsFile · 0.85

Calls 4

checkZipEntryExistsFunction · 0.85
parseZipPathFunction · 0.70
debugLogFunction · 0.70

Tested by

no test coverage detected