(srcPath, dstPath, tmpPath, backupPath)
| 457 | } |
| 458 | |
| 459 | function _commitAtomicFileReplacement(srcPath, dstPath, tmpPath, backupPath) { |
| 460 | try { fs.rmSync(tmpPath, { force: true }); } catch (_) {} |
| 461 | try { fs.rmSync(backupPath, { force: true }); } catch (_) {} |
| 462 | fs.copyFileSync(srcPath, tmpPath); |
| 463 | _copyFileIfPresent(dstPath, backupPath); |
| 464 | _retryFsLockOperation(function () { |
| 465 | fs.renameSync(tmpPath, dstPath); |
| 466 | }); |
| 467 | } |
| 468 | |
| 469 | function _restoreMovedInstallEntries(installRoot, movedEntries, copiedEntryNames) { |
| 470 | var ok = true; |
no test coverage detected