From 021cbbc2a81dc339ffe18b308df894f15c3a1e92 Mon Sep 17 00:00:00 2001 From: Ophestra Date: Sun, 19 Apr 2026 19:49:52 +0900 Subject: [PATCH] cmd/mbf: default daemon socket in cache This location makes more sense than the current directory. Signed-off-by: Ophestra --- cmd/mbf/cache.go | 3 --- cmd/mbf/main.go | 5 ++++- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/cmd/mbf/cache.go b/cmd/mbf/cache.go index 316e303d..5c89ca10 100644 --- a/cmd/mbf/cache.go +++ b/cmd/mbf/cache.go @@ -31,9 +31,6 @@ func (cache *cache) open() (err error) { return os.ErrInvalid } - if cache.base == "" { - cache.base = "cache" - } var base *check.Absolute if cache.base, err = filepath.Abs(cache.base); err != nil { return diff --git a/cmd/mbf/main.go b/cmd/mbf/main.go index a667c3f4..1438baa5 100644 --- a/cmd/mbf/main.go +++ b/cmd/mbf/main.go @@ -70,11 +70,14 @@ func main() { msg.SwapVerbose(!flagQuiet) cm.ctx, cm.msg = ctx, msg cm.base = os.ExpandEnv(cm.base) + if cm.base == "" { + cm.base = "cache" + } addr.Net = "unix" addr.Name = os.ExpandEnv(addr.Name) if addr.Name == "" { - addr.Name = "daemon" + addr.Name = filepath.Join(cm.base, "daemon") } return nil