From 8a0d41693f23b9cdc14f2b8d39e451e8405914b7 Mon Sep 17 00:00:00 2001 From: "alex.sharov" Date: Fri, 7 Jan 2022 14:38:38 +0700 Subject: [PATCH] create idx in tmpdir --- recsplit/recsplit.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/recsplit/recsplit.go b/recsplit/recsplit.go index 991382de2..2aaefeab6 100644 --- a/recsplit/recsplit.go +++ b/recsplit/recsplit.go @@ -623,7 +623,8 @@ func (rs *RecSplit) Build() error { _ = rs.indexW.Flush() _ = rs.indexF.Sync() _ = rs.indexF.Close() - _ = os.MkdirAll(rs.indexFile, 0744) + dir, _ := filepath.Split(rs.indexFile) + _ = os.MkdirAll(dir, 0744) if err := os.Rename(tmpIdxFilePath, rs.indexFile); err != nil { return err }