mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-01-06 16:58:49 +01:00
🐛 Fix relative path when importing markdown folder (#14096)
Close #14095
This commit is contained in:
parent
6080f86693
commit
530345bd09
1 changed files with 2 additions and 2 deletions
|
|
@ -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)
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue