update commandrunner func name

Former-commit-id: 3bd412928d6b00672aab16dc6a42de0f68568463 [formerly 36ed859cc6d7b1989293cba07fb9f6ee8db45daa] [formerly 17131ecf3be063c242453762f7a99385a081a344 [formerly 1354878838]]
Former-commit-id: 9e5e413a543bdf8afaf2dff860363f2987ef0b8b [formerly 905cafb00ddd33f8f4bf7a987fac9ff708be5461]
Former-commit-id: 2cb64a196ab87db0181ab8bc0ff653c8faadfa3f
pull/726/head
Henrique Dias 2017-06-25 21:03:38 +01:00
parent 0f9cb5dd62
commit 2abda6133e
1 changed files with 3 additions and 4 deletions

View File

@ -86,11 +86,11 @@ func parse(c *caddy.Controller) ([]*filemanager.FileManager, error) {
for c.NextBlock() {
switch c.Val() {
case "before_save":
if m.BeforeSave, err = CommandRunner(c); err != nil {
if m.BeforeSave, err = makeCommand(c); err != nil {
return configs, err
}
case "after_save":
if m.AfterSave, err = CommandRunner(c); err != nil {
if m.AfterSave, err = makeCommand(c); err != nil {
return configs, err
}
case "webdav":
@ -211,8 +211,7 @@ func parse(c *caddy.Controller) ([]*filemanager.FileManager, error) {
return configs, nil
}
// CommandRunner ...
func CommandRunner(c *caddy.Controller) (filemanager.Command, error) {
func makeCommand(c *caddy.Controller) (filemanager.Command, error) {
fn := func(r *http.Request, c *filemanager.FileManager, u *filemanager.User) error { return nil }
args := c.RemainingArgs()