()
| 59 | } |
| 60 | |
| 61 | function saveDownloads() { |
| 62 | try { |
| 63 | const toSave = downloads.filter( |
| 64 | (d) => d.status !== "downloading" && d.status !== "error", |
| 65 | ); |
| 66 | fs.writeFileSync(downloadsFile(), JSON.stringify(toSave, null, 2)); |
| 67 | } catch {} |
| 68 | } |
| 69 | |
| 70 | function cleanupTempFiles(downloadPath) { |
| 71 | if (!downloadPath) return; |
no test coverage detected