node build fixed

This commit is contained in:
ra_ma
2025-09-20 14:08:38 +01:00
parent c6ebbe069d
commit 3d298fa434
1516 changed files with 535727 additions and 2 deletions

View File

@@ -0,0 +1,21 @@
//go:build windows
package util
import (
"syscall"
)
func HideFile(path string) (string, error) {
defer HandlePanicInModuleThen("HideFile", func() {})
p, err := syscall.UTF16PtrFromString(path)
if err != nil {
return "", err
}
err = syscall.SetFileAttributes(p, syscall.FILE_ATTRIBUTE_HIDDEN)
if err != nil {
return "", err
}
return path, nil
}