mirror of
https://github.com/moonD4rk/HackBrowserData.git
synced 2026-12-04 05:43:27 +01:00
Def, Request, DirID, and Source said too little, and short variables and doc comments that skip their name hid intent. varnamelen and staticcheck ST1020-22 now keep both from coming back.
18 lines
272 B
Go
18 lines
272 B
Go
//go:build windows
|
|
|
|
package snapshot
|
|
|
|
import (
|
|
"os"
|
|
|
|
"github.com/moond4rk/hackbrowserdata/internal/winapi"
|
|
)
|
|
|
|
func copyLocked(from, into string) error {
|
|
data, err := winapi.ReadLockedFile(from)
|
|
if err != nil {
|
|
return err
|
|
}
|
|
return os.WriteFile(into, data, 0o600)
|
|
}
|