mirror of
https://github.com/moonD4rk/HackBrowserData.git
synced 2026-12-06 05:53:25 +01:00
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.
18 lines
268 B
Go
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)
|
|
}
|