(thumbnailString, newThumbnail)
| 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 { |
no test coverage detected