From 79726b5d8e6ebc13d61e083a4f598d9356328e5e Mon Sep 17 00:00:00 2001 From: Joram Wilander Date: Mon, 13 Nov 2017 14:46:29 -0500 Subject: Replace os.Rename with directory copy util in plugin extraction (#7825) --- app/plugins.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app/plugins.go') diff --git a/app/plugins.go b/app/plugins.go index 0ce669290..43b7a7451 100644 --- a/app/plugins.go +++ b/app/plugins.go @@ -358,7 +358,7 @@ func (a *App) InstallPlugin(pluginFile io.Reader) (*model.Manifest, *model.AppEr return nil, model.NewAppError("UnpackAndActivatePlugin", "app.plugin.manifest.app_error", nil, err.Error(), http.StatusBadRequest) } - os.Rename(tmpPluginDir, filepath.Join(a.PluginEnv.SearchPath(), manifest.Id)) + err = utils.CopyDir(tmpPluginDir, filepath.Join(a.PluginEnv.SearchPath(), manifest.Id)) if err != nil { return nil, model.NewAppError("UnpackAndActivatePlugin", "app.plugin.mvdir.app_error", nil, err.Error(), http.StatusInternalServerError) } -- cgit v1.2.3-1-g7c22