mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-16 22:50:13 +01:00
🐛 File names ending with . will be considered as missing assets
🎨 Improve HTML clipping https://github.com/siyuan-note/siyuan/issues/13355
This commit is contained in:
parent
821a58d895
commit
22190b532d
8 changed files with 36 additions and 25 deletions
|
|
@ -25,7 +25,6 @@ import (
|
|||
"strings"
|
||||
|
||||
"github.com/88250/gulu"
|
||||
"github.com/88250/lute/ast"
|
||||
"github.com/gin-gonic/gin"
|
||||
"github.com/siyuan-note/filelock"
|
||||
"github.com/siyuan-note/logging"
|
||||
|
|
@ -87,9 +86,7 @@ func InsertLocalAssets(id string, assetPaths []string, isUpload bool) (succMap m
|
|||
// 已经存在同样数据的资源文件的话不重复保存
|
||||
succMap[baseName] = existAsset.Path
|
||||
} else {
|
||||
ext := path.Ext(fName)
|
||||
fName = fName[0 : len(fName)-len(ext)]
|
||||
fName = fName + "-" + ast.NewNodeID() + ext
|
||||
fName = util.AssetName(fName)
|
||||
writePath := filepath.Join(assetsDirPath, fName)
|
||||
if _, err = f.Seek(0, io.SeekStart); err != nil {
|
||||
f.Close()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue