🎨 Bazaar resource directories support symlink https://github.com/siyuan-note/siyuan/pull/8263

This commit is contained in:
Liang Ding 2023-05-16 10:39:48 +08:00
parent 9455086820
commit 8b6abec8e9
No known key found for this signature in database
GPG key ID: 136F30F901A2231D

View file

@ -249,7 +249,7 @@ func UninstallBazaarTheme(themeName string) error {
func BazaarTemplates() (templates []*bazaar.Template) {
templates = bazaar.Templates()
for _, template := range templates {
template.Installed = gulu.File.IsExist(filepath.Join(util.DataDir, "templates", template.Name))
template.Installed = util.IsPathRegularDirOrSymlinkDir(filepath.Join(util.DataDir, "templates", template.Name))
if template.Installed {
if themeConf, err := bazaar.TemplateJSON(template.Name); nil == err && nil != themeConf {
if template.Version != themeConf.Version {