This commit is contained in:
Daniel 2024-12-19 23:51:12 +08:00
parent a3fec2c9e8
commit 77fa89010f
No known key found for this signature in database
GPG key ID: 86211BA83DF03017
3 changed files with 37 additions and 2 deletions

View file

@ -751,7 +751,7 @@ func ExportMarkdownHTML(id, savePath string, docx, merge bool) (name, dom string
from := filepath.Join(util.DataDir, emoji)
to := filepath.Join(savePath, emoji)
if err := filelock.Copy(from, to); err != nil {
logging.LogErrorf("copy emojis from [%s] to [%s] failed: %s", from, savePath, err)
logging.LogErrorf("copy emojis from [%s] to [%s] failed: %s", from, to, err)
return
}
}
@ -909,7 +909,7 @@ func ExportHTML(id, savePath string, pdf, image, keepFold, merge bool) (name, do
from := filepath.Join(util.DataDir, emoji)
to := filepath.Join(savePath, emoji)
if err := filelock.Copy(from, to); err != nil {
logging.LogErrorf("copy emojis from [%s] to [%s] failed: %s", from, savePath, err)
logging.LogErrorf("copy emojis from [%s] to [%s] failed: %s", from, to, err)
return
}
}
@ -1722,6 +1722,16 @@ func exportSYZip(boxID, rootDirPath, baseFolderName string, docPaths []string) (
copiedAssets.Add(asset)
}
// 复制自定义表情图片
emojis := emojisInTree(tree)
for _, emoji := range emojis {
from := filepath.Join(util.DataDir, emoji)
to := filepath.Join(exportFolder, emoji)
if copyErr := filelock.Copy(from, to); copyErr != nil {
logging.LogErrorf("copy emojis from [%s] to [%s] failed: %s", from, to, copyErr)
}
}
}
// 导出数据库 Attribute View export https://github.com/siyuan-note/siyuan/issues/8710