(backupPath, dstPath)
| 450 | } |
| 451 | |
| 452 | function _restoreFileBackupIfPresent(backupPath, dstPath) { |
| 453 | if (!backupPath || !fs.existsSync(backupPath)) return false; |
| 454 | try { fs.rmSync(dstPath, { recursive: true, force: true }); } catch (_) {} |
| 455 | fs.copyFileSync(backupPath, dstPath); |
| 456 | return true; |
| 457 | } |
| 458 | |
| 459 | function _commitAtomicFileReplacement(srcPath, dstPath, tmpPath, backupPath) { |
| 460 | try { fs.rmSync(tmpPath, { force: true }); } catch (_) {} |
no outgoing calls
no test coverage detected