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

Function readModelFileHandler

main.js:7474–7491  ·  view source on GitHub ↗
(event, filePath)

Source from the content-addressed store, hash-verified

7472 } catch (error) {
7473 console.error('Error getting app version:', error);
7474 return null;
7475 }
7476});
7477
7478// Add error handling to the saveSetting handler
7479const saveSettingHandler = async (event, key, value) => {
7480 try {
7481 console.log('Main Process - Saving setting:', key, value);
7482
7483 // Ensure database is initialized
7484 if (!db) {
7485 console.error('Database not initialized when saving setting');
7486 return false;
7487 }
7488
7489 // If this is the CollectUsage setting being changed, track the change
7490 if (key === 'CollectUsage') {
7491 const oldValue = cachedPrepare('SELECT value FROM settings WHERE key = ?').get(key)?.value;
7492 console.log('CollectUsage - Old value:', oldValue, 'New value:', value);
7493
7494 // If turning on analytics and it was previously off, track this event

Callers

nothing calls this directly

Calls 3

isUrlModelFunction · 0.85
extractModelFromZipFunction · 0.85
parseZipPathFunction · 0.70

Tested by

no test coverage detected