docs and simplify

This commit is contained in:
Henrique Dias committed 2016-02-14 10:20:47 +00:00
1 parent 4a6c53a12b
commit 2414f2edec
5 files changed
+10 -9

No files matched your search

+2 -3
View File
@@ -40,9 +40,8 @@ func PUT(w http.ResponseWriter, r *http.Request, c *config.Config) (int, error)
new = strings.TrimSuffix(new, "/")
new = c.Path + new
err := os.Rename(old, new)
if err != nil {
// Renames the file/folder
if err := os.Rename(old, new); err != nil {
return 500, err
}