mirror of
https://github.com/zyedidia/micro.git
synced 2026-02-06 07:00:24 +09:00
Allow symlink plugin directory
This commit is contained in:
@@ -126,7 +126,9 @@ func InitRuntimeFiles() {
|
||||
// Search configDir for plugin-scripts
|
||||
files, _ := ioutil.ReadDir(filepath.Join(configDir, "plugins"))
|
||||
for _, f := range files {
|
||||
if f.IsDir() {
|
||||
realpath, _ := filepath.EvalSymlinks(filepath.Join(configDir, "plugins", f.Name()))
|
||||
realpathStat, _ := os.Stat(realpath)
|
||||
if realpathStat.IsDir() {
|
||||
scriptPath := filepath.Join(configDir, "plugins", f.Name(), f.Name()+".lua")
|
||||
if _, err := os.Stat(scriptPath); err == nil {
|
||||
AddRuntimeFile(RTPlugin, realFile(scriptPath))
|
||||
|
||||
Reference in New Issue
Block a user