Commit fd0ceadd authored by Janne Koschinski's avatar Janne Koschinski

Improved upload API

parent 75fd85d4
......@@ -65,7 +65,7 @@ func pageImageDetail(ctx PageContext) http.Handler {
}
for _, definition := range ctx.Config.Sizes {
err := os.Remove(path.Join(ctx.Config.TargetFolder, fmt.Sprintf("%s%s", info.Id, definition.Suffix)))
if !os.IsNotExist(err) {
if err != nil && !os.IsNotExist(err) {
panic(err)
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment