From ca83069f61d6b4085975f8057cf90cfdd8f1d1b6 Mon Sep 17 00:00:00 2001 From: CrazyJius Date: Tue, 9 May 2023 08:54:50 +0800 Subject: [PATCH] fix: Mkdir permission denied--#8 --- merge.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/merge.go b/merge.go index fe56e5f6..e70b1580 100755 --- a/merge.go +++ b/merge.go @@ -157,8 +157,10 @@ func (db *DB) Merge() error { func (db *DB) getMergePath() string { // 获取数据库父级目录 parentDir := path.Dir(path.Clean(db.options.DirPath)) + // DB base path + basePath := path.Base(db.options.DirPath) // 返回 merge 文件路径 - return filepath.Join(parentDir + mergeDirName) + return filepath.Join(parentDir, basePath+mergeDirName) } // 加载 merge 数据目录