Use os.Create when expanding plugins

This commit is contained in:
joeduffy 2018-02-11 20:17:20 -05:00
parent 96088dd56f
commit f2cdc8a9ee

View file

@ -86,7 +86,7 @@ func (info PluginInfo) Install(tarball io.ReadCloser) error {
}
// If so, expand it into the plugin home directory.
dst, err := os.Open(filepath.Join(pluginDir, header.Name))
dst, err := os.Create(filepath.Join(pluginDir, header.Name))
if err != nil {
return err
}