From 530345bd09b779f50583b9f1f8e57b550de9b6ea Mon Sep 17 00:00:00 2001 From: Levi Zim Date: Sat, 15 Feb 2025 23:40:15 +0800 Subject: [PATCH] :bug: Fix relative path when importing markdown folder (#14096) Close #14095 --- kernel/model/import.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/kernel/model/import.go b/kernel/model/import.go index 87dd85ddb..6691e9213 100644 --- a/kernel/model/import.go +++ b/kernel/model/import.go @@ -866,13 +866,13 @@ func ImportFromLocalPath(boxID, localPath string, toPath string) (err error) { return ast.WalkContinue } - absolutePath := filepath.Join(localPath, dest) + absolutePath := filepath.Join(currentDir, dest) newAbsolutePath := absolutePath decodedDest := string(html.DecodeDestination([]byte(dest))) if decodedDest != dest { dest = decodedDest - newAbsolutePath = filepath.Join(localPath, dest) + newAbsolutePath = filepath.Join(currentDir, dest) gulu.File.Copy(absolutePath, newAbsolutePath) }