Fast and extensible multi-platform HTTP/1-2-3 web server with automatic HTTPS
Mirrored from https://github.com/Slazee/caddy.git
Synced Nov 13, 15:30 UTC
Fix compilation on Windows
Matthew Holt committed
Jul 28, 2022 at 15:44 UTC
56c139f003292005dd5dd974ffd770b8620e8aef
1 file changed
+4
-1
cmd/removebinary_windows.go
+4
-1
@@ -31,6 +31,9 @@ import (
31
func removeCaddyBinary(path string) error {
32
var sI syscall.StartupInfo
33
var pI syscall.ProcessInformation
34
- argv := syscall.UTF16PtrFromString(filepath.Join(os.Getenv("windir"), "system32", "cmd.exe") + " /C del " + path)
34
+ argv, err := syscall.UTF16PtrFromString(filepath.Join(os.Getenv("windir"), "system32", "cmd.exe") + " /C del " + path)
35
+ if err != nil {
36
+ return err
37
+ }
38
return syscall.CreateProcess(nil, argv, nil, nil, true, 0, nil, nil, &sI, &pI)
39
}