mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-01-24 01:06:09 +01:00
🎨 Improve importing Markdown folder https://github.com/siyuan-note/siyuan/issues/11567
This commit is contained in:
parent
d7407b74a5
commit
36493a8a3a
2 changed files with 27 additions and 0 deletions
|
|
@ -713,6 +713,11 @@ func ImportFromLocalPath(boxID, localPath string, toPath string) (err error) {
|
|||
targetPaths[curRelPath] = targetPath
|
||||
|
||||
if info.IsDir() {
|
||||
if subMdFiles := util.GetFilePathsByExts(currentPath, []string{".md", ".markdown"}); 1 > len(subMdFiles) {
|
||||
// 如果该文件夹中不包含 Markdown 文件则不处理 https://github.com/siyuan-note/siyuan/issues/11567
|
||||
return nil
|
||||
}
|
||||
|
||||
tree = treenode.NewTree(boxID, targetPath, hPath, title)
|
||||
importTrees = append(importTrees, tree)
|
||||
return nil
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue