Former-commit-id: f8f0efe6986155fb2277b6b471f6387f28a8d8c2 [formerly 33103c80bc2d9ee3e8b4139254d0a3edbfc1721b] [formerly 258653deda36f045230cca84e23e880041b48aba [formerly a3c70f7930]]
Former-commit-id: d46ca2362ad160c59b090fa71d1d2bbeb3425cf6 [formerly 51c7941a77cbbdee4ede206edd98981b82a56bba]
Former-commit-id: 08fde98df060f53f8f4f7163956c0ce6ef78f434
pull/726/head
Henrique Dias 2017-07-19 07:43:04 +01:00
parent f7720cb50b
commit 9ef2229835
2 changed files with 3 additions and 3 deletions

View File

@ -178,8 +178,8 @@ func New(database string, base User) (*FileManager, error) {
err = db.Get("config", "commands", &m.Commands)
if err != nil && err == storm.ErrNotFound {
m.Commands = map[string][]string{
"before_save": []string{},
"after_save": []string{},
"before_save": {},
"after_save": {},
}
err = db.Set("config", "commands", m.Commands)
}

View File

@ -187,7 +187,7 @@ func cleanURL(path string) (string, string) {
return "", path
}
return path[0:i], path[i:len(path)]
return path[0:i], path[i:]
}
// renderFile renders a file using a template with some needed variables.