Skip to content

Commit c1a6206

Browse files
committed
Signed-off-by: Daniel <845765@qq.com>
1 parent 18761d4 commit c1a6206

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

kernel/model/export.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3411,6 +3411,11 @@ func exportPandocConvertZip(baseFolderName string, docPaths, defBlockIDs []strin
34113411
name = util.FilterFileName(name)
34123412
hPath = path.Join(dir, name)
34133413
p = hPath + ext
3414+
if 1 == len(docPaths) {
3415+
// 如果仅导出单个文档则使用文档标题作为文件名,不使用父路径 https://github.com/siyuan-note/siyuan/issues/13635#issuecomment-3794560233
3416+
p = name + ext
3417+
}
3418+
34143419
writePath := filepath.Join(exportFolder, p)
34153420
hash := fmt.Sprintf("%x", sha1.Sum([]byte(md)))
34163421
if gulu.File.IsExist(writePath) && hash != wrotePathHash[writePath] {

0 commit comments

Comments
 (0)