mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-09-22 00:20:47 +02:00
🎨 Improve asset rename ocr text https://github.com/siyuan-note/siyuan/issues/12974
This commit is contained in:
parent
ca6955dc31
commit
aab6131945
2 changed files with 16 additions and 1 deletions
|
@ -655,6 +655,12 @@ func RenameAsset(oldPath, newName string) (newPath string, err error) {
|
|||
}
|
||||
}
|
||||
|
||||
if ocrText := util.GetAssetText(oldPath); "" != ocrText {
|
||||
// 图片重命名后 ocr-texts.json 需要更新 https://github.com/siyuan-note/siyuan/issues/12974
|
||||
util.SetAssetText(newPath, ocrText)
|
||||
util.RemoveAssetText(oldPath)
|
||||
}
|
||||
|
||||
IncSync()
|
||||
return
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue