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,24 @@
//go:build !windows
package util
import (
"os"
"path/filepath"
"strings"
)
func HideFile(path string) (string, error) {
filename := filepath.Base(path)
if strings.HasPrefix(filename, ".") {
return path, nil
}
newPath := filepath.Join(filepath.Dir(path), "."+filename)
err := os.Rename(path, newPath)
if err != nil {
return "", err
}
return newPath, nil
}