mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-01-06 08:48: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
|
|
@ -25,7 +25,6 @@ import (
|
|||
"sync"
|
||||
"time"
|
||||
|
||||
"github.com/88250/gulu"
|
||||
"github.com/dustin/go-humanize"
|
||||
"github.com/panjf2000/ants/v2"
|
||||
"github.com/siyuan-note/httpclient"
|
||||
|
|
@ -107,7 +106,7 @@ func InstalledTemplates() (ret []*Template) {
|
|||
ret = []*Template{}
|
||||
|
||||
templatesPath := filepath.Join(util.DataDir, "templates")
|
||||
if !gulu.File.IsDir(templatesPath) {
|
||||
if !util.IsPathRegularDirOrSymlinkDir(templatesPath) {
|
||||
return
|
||||
}
|
||||
|
||||
|
|
@ -120,7 +119,7 @@ func InstalledTemplates() (ret []*Template) {
|
|||
bazaarTemplates := Templates()
|
||||
|
||||
for _, templateDir := range templateDirs {
|
||||
if !templateDir.IsDir() {
|
||||
if !util.IsDirRegularOrSymlink(templateDir) {
|
||||
continue
|
||||
}
|
||||
dirName := templateDir.Name()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue