mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-27 11:58: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
|
|
@ -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 InstalledWidgets() (ret []*Widget) {
|
|||
ret = []*Widget{}
|
||||
|
||||
widgetsPath := filepath.Join(util.DataDir, "widgets")
|
||||
if !gulu.File.IsDir(widgetsPath) {
|
||||
if !util.IsPathRegularDirOrSymlinkDir(widgetsPath) {
|
||||
return
|
||||
}
|
||||
|
||||
|
|
@ -118,7 +117,7 @@ func InstalledWidgets() (ret []*Widget) {
|
|||
bazaarWidgets := Widgets()
|
||||
|
||||
for _, widgetDir := range widgetDirs {
|
||||
if !widgetDir.IsDir() {
|
||||
if !util.IsDirRegularOrSymlink(widgetDir) {
|
||||
continue
|
||||
}
|
||||
dirName := widgetDir.Name()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue