mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-16 14:40:12 +01:00
This commit is contained in:
parent
f29bf51c12
commit
f39750e393
1 changed files with 9 additions and 1 deletions
|
|
@ -453,8 +453,16 @@ func RenameAsset(oldPath, newName string) {
|
|||
return
|
||||
}
|
||||
|
||||
newPath := util.AssetName(newName)
|
||||
newName = strings.TrimSpace(newName)
|
||||
newName = gulu.Str.RemoveInvisible(newName)
|
||||
if path.Base(oldPath) == newName {
|
||||
return
|
||||
}
|
||||
if "" == newName {
|
||||
return
|
||||
}
|
||||
|
||||
newPath := util.AssetName(newName)
|
||||
luteEngine := NewLute()
|
||||
for _, notebook := range notebooks {
|
||||
pages := pagedPaths(filepath.Join(util.DataDir, notebook.ID), 32)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue