mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-01-02 23:08:49 +01:00
Bazaar resource directories support symlink (#8263)
* 🎨 bazaar resource directories support symlink * 🎨 bazaar resource directories support symlink
This commit is contained in:
parent
85496345ef
commit
fdbfe6b848
8 changed files with 38 additions and 19 deletions
|
|
@ -101,6 +101,11 @@ func Icons() (icons []*Icon) {
|
|||
|
||||
func InstalledIcons() (ret []*Icon) {
|
||||
ret = []*Icon{}
|
||||
|
||||
if !util.IsPathRegularDirOrSymlinkDir(util.IconsPath) {
|
||||
return
|
||||
}
|
||||
|
||||
iconDirs, err := os.ReadDir(util.IconsPath)
|
||||
if nil != err {
|
||||
logging.LogWarnf("read icons folder failed: %s", err)
|
||||
|
|
@ -110,7 +115,7 @@ func InstalledIcons() (ret []*Icon) {
|
|||
bazaarIcons := Icons()
|
||||
|
||||
for _, iconDir := range iconDirs {
|
||||
if !iconDir.IsDir() {
|
||||
if !util.IsDirRegularOrSymlink(iconDir) {
|
||||
continue
|
||||
}
|
||||
dirName := iconDir.Name()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue