refactor(archive): rename BuildArchive to WriteArchive

It writes a zip and returns a count; Build prefix clashed with
BuildDump, which constructs an in-memory value with no I/O.
This commit is contained in:
moonD4rk
2026-06-07 15:56:56 +08:00
parent 8851ef63ba
commit 94e13cc4fc
3 changed files with 8 additions and 8 deletions
+2 -2
View File
@@ -19,11 +19,11 @@ type Archivable interface {
ArchiveSources(categories []types.Category) []chromium.ArchiveSource
}
// BuildArchive packs each browser's decryption-relevant files into a zip whose internal layout is
// WriteArchive packs each browser's decryption-relevant files into a zip whose internal layout is
// <browser-key>/<User Data layout>, so a restore can re-expand it and decrypt with a keys.json. Files
// are staged through a locked-file session first because Windows holds exclusive SQLite locks. Returns
// the number of source entries staged (a directory source counts once).
func BuildArchive(browsers []Browser, categories []types.Category, outPath string) (int, error) {
func WriteArchive(browsers []Browser, categories []types.Category, outPath string) (int, error) {
session, err := filemanager.NewSession()
if err != nil {
return 0, err