chore: Make unix socket follow homeDir

This commit is contained in:
xishang0128 2024-04-19 17:33:00 +08:00
parent d4ececae20
commit 99b274acbc
No known key found for this signature in database
GPG Key ID: 44A1E10B5ADF68CB

View File

@ -159,6 +159,8 @@ func Start(addr string, tlsAddr string, secret string,
}
func StartUnix(addr string, isDebug bool) {
addr = C.Path.Resolve(addr)
dir := filepath.Dir(addr)
if _, err := os.Stat(dir); os.IsNotExist(err) {
if err := os.MkdirAll(dir, 0o755); err != nil {