github.com/keybase/client/go@v0.0.0-20241007131713-f10651d043c8/chat/attachments/quarantine_windows.go (about) 1 //go:build windows 2 // +build windows 3 4 package attachments 5 6 import ( 7 "os" 8 9 "golang.org/x/net/context" 10 ) 11 12 func Quarantine(ctx context.Context, path string) error { 13 // Zones 0-4 correspond to Local Machine, Local intranet, Trusted sites, Internet, Restricted sites. 14 // https://docs.microsoft.com/en-us/previous-versions/windows/internet-explorer/ie-developer/platform-apis/ms537183(v=vs.85) 15 return os.WriteFile(path+":Zone.Identifier", []byte("[ZoneTransfer]\r\nZoneId=3"), 0644) 16 }