1
Fork 0
mirror of https://github.com/caddyserver/caddy.git synced 2024-12-16 21:56:40 -05:00

Fix deprecation notice by using UTF16PtrFromString

This commit is contained in:
Matthew Holt 2022-07-28 15:23:56 -06:00
parent ff2ba6de8a
commit 2e70d1d3bf
No known key found for this signature in database
GPG key ID: 2A349DD577D586A5

View file

@ -31,6 +31,6 @@ import (
func removeCaddyBinary(path string) error {
var sI syscall.StartupInfo
var pI syscall.ProcessInformation
argv := syscall.StringToUTF16Ptr(filepath.Join(os.Getenv("windir"), "system32", "cmd.exe") + " /C del " + path)
argv := syscall.UTF16PtrFromString(filepath.Join(os.Getenv("windir"), "system32", "cmd.exe") + " /C del " + path)
return syscall.CreateProcess(nil, argv, nil, nil, true, 0, nil, nil, &sI, &pI)
}