From 41ab4385e4e7ca71e2b6688ecc88dd951e4c422a Mon Sep 17 00:00:00 2001 From: tanopanta <25007602+tanopanta@users.noreply.github.com> Date: Thu, 23 Jun 2022 02:28:45 +0900 Subject: [PATCH] fix: temp dir to be the same as SerchDir to avoid invalid cross-device link (#1203) --- format/format.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/format/format.go b/format/format.go index 9421e0605..d1ecb4d24 100644 --- a/format/format.go +++ b/format/format.go @@ -103,7 +103,7 @@ func (f *Format) format(path string) error { } func write(path string, contents []byte) error { - f, err := ioutil.TempFile(filepath.Split(path)) + f, err := ioutil.TempFile(filepath.Dir(path), filepath.Base(path)) if err != nil { return err }