Files
HackBrowserData/internal/snapshot/copy_windows.go
T
Roger 0b8cc23216 refactor: introduce internal/snapshot for copy and zip (#653)
One copier and one zip transport serve archive, restore, and every profile copy, so locked-file handling has one home.
Dropping otiai10/copy takes x/sync out of every binary and testing out of the Windows exe.
2026-10-27 14:54:54 +08:00

18 lines
268 B
Go

//go:build windows
package snapshot
import (
"os"
"github.com/moond4rk/hackbrowserdata/internal/winapi"
)
func copyLocked(src, dst string) error {
data, err := winapi.ReadLockedFile(src)
if err != nil {
return err
}
return os.WriteFile(dst, data, 0o600)
}