🎨 Improve code snippet writing https://github.com/siyuan-note/siyuan/issues/13101
This commit is contained in:
parent
e15247c052
commit
738a53f43e
1 changed files with 4 additions and 0 deletions
|
@ -108,6 +108,10 @@ func writeSnippetsConf(snippets []*conf.Snippet) (err error) {
|
|||
}
|
||||
|
||||
confPath := filepath.Join(util.SnippetsPath, "conf.json")
|
||||
oldData, _ := filelock.ReadFile(confPath)
|
||||
if string(oldData) == string(data) {
|
||||
return
|
||||
}
|
||||
err = filelock.WriteFile(confPath, data)
|
||||
return
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue