mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-01-05 16:28:49 +01:00
🐛 导入包含 . 的 Markdown 文件夹问题 Fix https://github.com/siyuan-note/siyuan/issues/5148
This commit is contained in:
parent
2ae388d2bb
commit
2ca33753e0
1 changed files with 6 additions and 3 deletions
|
|
@ -407,9 +407,12 @@ func ImportFromLocalPath(boxID, localPath string, toPath string) (err error) {
|
|||
}
|
||||
|
||||
var tree *parse.Tree
|
||||
|
||||
ext := path.Ext(info.Name())
|
||||
title := strings.TrimSuffix(info.Name(), ext)
|
||||
var ext string
|
||||
title := info.Name()
|
||||
if !info.IsDir() {
|
||||
ext = path.Ext(info.Name())
|
||||
title = strings.TrimSuffix(info.Name(), ext)
|
||||
}
|
||||
id := ast.NewNodeID()
|
||||
|
||||
curRelPath := filepath.ToSlash(strings.TrimPrefix(currentPath, localPath))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue