summaryrefslogtreecommitdiffstats
path: root/models/wiki.go
diff options
context:
space:
mode:
authorkolaente <konrad@kola-entertainments.de>2019-06-12 21:41:28 +0200
committertechknowlogick <techknowlogick@gitea.io>2019-06-12 15:41:28 -0400
commitf9ec2f89f2265bc1371a6c62359de9816534fa6b (patch)
treef48b138a457e5ac6cf843bbb38400926704370f7 /models/wiki.go
parent5832f8d90df2d72cb38698c3e9050f2b29717dc7 (diff)
downloadgitea-f9ec2f89f2265bc1371a6c62359de9816534fa6b.tar.gz
gitea-f9ec2f89f2265bc1371a6c62359de9816534fa6b.zip
Add golangci (#6418)
Diffstat (limited to 'models/wiki.go')
-rw-r--r--models/wiki.go12
1 files changed, 10 insertions, 2 deletions
diff --git a/models/wiki.go b/models/wiki.go
index bcf97c0765..9ae3386333 100644
--- a/models/wiki.go
+++ b/models/wiki.go
@@ -115,7 +115,11 @@ func (repo *Repository) updateWikiPage(doer *User, oldWikiName, newWikiName, con
if err != nil {
return err
}
- defer RemoveTemporaryPath(basePath)
+ defer func() {
+ if err := RemoveTemporaryPath(basePath); err != nil {
+ log.Error("Merge: RemoveTemporaryPath: %s", err)
+ }
+ }()
cloneOpts := git.CloneRepoOptions{
Bare: true,
@@ -246,7 +250,11 @@ func (repo *Repository) DeleteWikiPage(doer *User, wikiName string) (err error)
if err != nil {
return err
}
- defer RemoveTemporaryPath(basePath)
+ defer func() {
+ if err := RemoveTemporaryPath(basePath); err != nil {
+ log.Error("Merge: RemoveTemporaryPath: %s", err)
+ }
+ }()
if err := git.Clone(repo.WikiPath(), basePath, git.CloneRepoOptions{
Bare: true,