MCPcopy Create free account
hub / github.com/Selectively11/CloudRedirect / Backup

Method Backup

ui/Services/Patching/Patcher.cs:807–821  ·  view source on GitHub ↗
(string path)

Source from the content-addressed store, hash-verified

805 }
806
807 void Backup(string path)
808 {
809 var orig = path + ".orig";
810 if (!File.Exists(orig))
811 {
812 // .orig: never overwritten; atomic copy avoids torn recovery point.
813 FileUtils.AtomicCopy(path, orig);
814 Log($" Original saved to {orig}");
815 }
816
817 // .bak: rolling per-cycle backup; atomic copy avoids torn restores.
818 var bak = path + ".bak";
819 FileUtils.AtomicCopy(path, bak);
820 Log($" Backed up to {bak}");
821 }
822
823 // Bracket both backups before either write so partial states are recoverable.
824 void BackupBoth(string firstPath, string secondPath)

Callers

nothing calls this directly

Calls 1

AtomicCopyMethod · 0.80

Tested by

no test coverage detected