diff options
Diffstat (limited to 'models/wiki.go')
-rw-r--r-- | models/wiki.go | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/models/wiki.go b/models/wiki.go index 890e62b0cd..89da4571db 100644 --- a/models/wiki.go +++ b/models/wiki.go @@ -125,9 +125,7 @@ func (repo *Repository) updateWikiPage(doer *User, oldTitle, title, content, mes // So we want to make sure the symlink is removed before write anything. // The new file we created will be in normal text format. - if err := os.Remove(filename); err != nil { - return fmt.Errorf("Fail to remove %s: %v", filename, err) - } + _ = os.Remove(filename) if err = ioutil.WriteFile(filename, []byte(content), 0666); err != nil { return fmt.Errorf("WriteFile: %v", err) |