Bazaar resource directories support symlink (#8263)

* 🎨 bazaar resource directories support symlink

* 🎨 bazaar resource directories support symlink
This commit is contained in:
颖逸 2023-05-16 10:34:38 +08:00 committed by GitHub
parent 85496345ef
commit fdbfe6b848
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 38 additions and 19 deletions

View file

@ -24,7 +24,6 @@ import (
"strings"
"sync"
"github.com/88250/gulu"
"github.com/dustin/go-humanize"
ants "github.com/panjf2000/ants/v2"
"github.com/siyuan-note/httpclient"
@ -105,7 +104,7 @@ func Themes() (ret []*Theme) {
func InstalledThemes() (ret []*Theme) {
ret = []*Theme{}
if !gulu.File.IsDir(util.ThemesPath) {
if !util.IsPathRegularDirOrSymlinkDir(util.ThemesPath) {
return
}
@ -118,7 +117,7 @@ func InstalledThemes() (ret []*Theme) {
bazaarThemes := Themes()
for _, themeDir := range themeDirs {
if !themeDir.IsDir() {
if !util.IsDirRegularOrSymlink(themeDir) {
continue
}
dirName := themeDir.Name()