Signed-off-by: Daniel <845765@qq.com>
This commit is contained in:
Daniel 2026-01-24 20:31:24 +08:00
parent 18761d43a3
commit c1a6206f7b
No known key found for this signature in database
GPG key ID: 86211BA83DF03017

View file

@ -3411,6 +3411,11 @@ func exportPandocConvertZip(baseFolderName string, docPaths, defBlockIDs []strin
name = util.FilterFileName(name)
hPath = path.Join(dir, name)
p = hPath + ext
if 1 == len(docPaths) {
// 如果仅导出单个文档则使用文档标题作为文件名,不使用父路径 https://github.com/siyuan-note/siyuan/issues/13635#issuecomment-3794560233
p = name + ext
}
writePath := filepath.Join(exportFolder, p)
hash := fmt.Sprintf("%x", sha1.Sum([]byte(md)))
if gulu.File.IsExist(writePath) && hash != wrotePathHash[writePath] {