Replace os.Rename with directory copy util in plugin extraction (#7825)

Этот коммит содержится в:
Joram Wilander
2017-11-13 14:46:29 -05:00
коммит произвёл Christopher Speller
родитель 120fbed0f7
Коммит 79726b5d8e
3 изменённых файлов: 156 добавлений и 1 удалений

Просмотреть файл

@@ -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)
}