🎨 集市支持已安装的包单独显示 https://github.com/siyuan-note/siyuan/issues/5678

This commit is contained in:
Liang Ding 2022-09-02 10:32:24 +08:00
parent 1b89ebee28
commit 7e8bcc4f62
No known key found for this signature in database
GPG key ID: 136F30F901A2231D
2 changed files with 3 additions and 3 deletions

View file

@ -96,9 +96,9 @@ func Icons() (icons []*Icon) {
func InstalledIcons() (ret []*Icon) {
ret = []*Icon{}
dir, err := os.Open(filepath.Join(util.DataDir, "icons"))
dir, err := os.Open(filepath.Join(util.AppearancePath, "icons"))
if nil != err {
logging.LogWarnf("open icons folder [%s] failed: %s", util.ThemesPath, err)
logging.LogWarnf("open icons folder failed: %s", err)
return
}
iconDirs, err := dir.Readdir(-1)

View file

@ -107,7 +107,7 @@ func IconJSON(iconDirName string) (ret map[string]interface{}, err error) {
}
func TemplateJSON(templateDirName string) (ret map[string]interface{}, err error) {
p := filepath.Join(util.DataDir, templateDirName, "template.json")
p := filepath.Join(util.DataDir, "templates", templateDirName, "template.json")
if !gulu.File.IsExist(p) {
err = os.ErrNotExist
return