This commit is contained in:
Daniel 2024-11-12 17:23:53 +08:00
parent e15247c052
commit 738a53f43e
No known key found for this signature in database
GPG key ID: 86211BA83DF03017

View file

@ -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
}