Skip to content
This repository has been archived by the owner on Nov 8, 2022. It is now read-only.

Commit

Permalink
Use configured temp directory when loaded a plugin through the autodi…
Browse files Browse the repository at this point in the history
…scovery path
  • Loading branch information
Jacob Lisi committed Mar 16, 2017
1 parent a292a0a commit cc39d1a
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion control/control.go
Original file line number Diff line number Diff line change
Expand Up @@ -313,6 +313,11 @@ func (p *pluginControl) Start() error {
controlLogger.WithFields(log.Fields{
"_block": "start",
}).Info("auto discover path is enabled")
tempDirPath := p.GetTempDir()
controlLogger.WithFields(log.Fields{
"_block": "start",
"tempdirpath": tempDirPath,
}).Info("temporary directory path set")
paths := filepath.SplitList(p.Config.AutoDiscoverPath)
p.SetAutodiscoverPaths(paths)
for _, pa := range paths {
Expand Down Expand Up @@ -391,7 +396,7 @@ func (p *pluginControl) Start() error {
}).Warn("Auto-loading of plugin '", fileName, "' skipped (plugin not executable)")
continue
}
rp, err := core.NewRequestedPlugin(path.Join(fullPath, fileName), GetDefaultConfig().TempDirPath, nil)
rp, err := core.NewRequestedPlugin(path.Join(fullPath, fileName), tempDirPath, nil)
if err != nil {
controlLogger.WithFields(log.Fields{
"_block": "start",
Expand Down

0 comments on commit cc39d1a

Please sign in to comment.