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

Function addThumbnailToModel

main.js:4143–4148  ·  view source on GitHub ↗
(thumbnailString, newThumbnail)

Source from the content-addressed store, hash-verified

4141 } else {
4142 // Last resort: copy to temp directory (shouldn't be needed if unpacked correctly)
4143 console.warn(`[Main] WARNING: scan-worker.js not found in app.asar.unpacked, copying to temp as fallback`);
4144 const tempDir = path.join(os.tmpdir(), 'printventory-worker');
4145 if (!fs.existsSync(tempDir)) {
4146 fs.mkdirSync(tempDir, { recursive: true });
4147 }
4148 const tempWorkerPath = path.join(tempDir, 'scan-worker.js');
4149 // Only copy if it doesn't exist
4150 if (!fs.existsSync(tempWorkerPath)) {
4151 try {

Callers 1

main.jsFile · 0.85

Calls 1

parseThumbnailsFunction · 0.70

Tested by

no test coverage detected