mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-01-03 23:38:49 +01:00
🎨 Improve exporting/importing .sy.zip https://github.com/siyuan-note/siyuan/issues/13531
This commit is contained in:
parent
a3fec2c9e8
commit
77fa89010f
3 changed files with 37 additions and 2 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue