x
This commit is contained in:
@@ -29,13 +29,14 @@ var processes sync.Map
|
|||||||
|
|
||||||
func initNodePlugins() {
|
func initNodePlugins() {
|
||||||
initLanguage()
|
initLanguage()
|
||||||
root := utils.ExecPath + "/plugins"
|
root := strings.ReplaceAll(utils.ExecPath+"/plugins", "\\", "/")
|
||||||
plugins := []string{root}
|
plugins := []string{root}
|
||||||
os.Mkdir(root, 0755)
|
os.Mkdir(root, 0755)
|
||||||
fmt.Println("root", root)
|
fmt.Println("root", root)
|
||||||
filepath.Walk(root, func(path string, info os.FileInfo, err error) error {
|
filepath.Walk(root, func(path string, info os.FileInfo, err error) error {
|
||||||
|
fmt.Println("path", path)
|
||||||
path = strings.ReplaceAll(path, "\\", "/")
|
path = strings.ReplaceAll(path, "\\", "/")
|
||||||
if !strings.HasPrefix(path, utils.ExecPath+"/plugins/") {
|
if !strings.HasPrefix(path, root+"/") {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
files := strings.Split(strings.Replace(path, root+"/", "", 1), "/")
|
files := strings.Split(strings.Replace(path, root+"/", "", 1), "/")
|
||||||
|
|||||||
Reference in New Issue
Block a user