From 796a34613a70725791492994af3d65061b5e1322 Mon Sep 17 00:00:00 2001 From: tanopanta <25007602+tanopanta@users.noreply.github.com> Date: Mon, 27 Jun 2022 23:42:14 +0900 Subject: [PATCH] fix: temp dir to be the same as SerchDir to avoid invalid cross-device link (#1203) (#1241) --- 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 }