summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorUnknwon <u@gogs.io>2016-02-11 19:57:19 -0500
committerUnknwon <u@gogs.io>2016-02-11 19:57:19 -0500
commit600d8edaca56ac9b74bd73c3625c17875ecb848e (patch)
treef49f05aa42c571f86fa22ba8ebdfe64d4eec6250
parent23bc9a29113991dd3f2d8d5e183a8c97309feba3 (diff)
parentce3708b3ea1e2c5dcfeb4cf852651cbda2dfd88c (diff)
downloadgitea-600d8edaca56ac9b74bd73c3625c17875ecb848e.tar.gz
gitea-600d8edaca56ac9b74bd73c3625c17875ecb848e.zip
Merge pull request #2604 from joshfng/fix-wiki-transfer
Remove local wiki copy on repo transfer. Fixes #2558
-rw-r--r--models/repo.go1
1 files changed, 1 insertions, 0 deletions
diff --git a/models/repo.go b/models/repo.go
index 95063134a8..fec007c9cc 100644
--- a/models/repo.go
+++ b/models/repo.go
@@ -1103,6 +1103,7 @@ func TransferOwnership(u *User, newOwnerName string, repo *Repository) error {
wikiPath := WikiPath(owner.Name, repo.Name)
if com.IsExist(wikiPath) {
+ RemoveAllWithNotice("Delete repository wiki local copy", repo.LocalWikiPath())
if err = os.Rename(wikiPath, WikiPath(newOwner.Name, repo.Name)); err != nil {
return fmt.Errorf("rename repository wiki: %v", err)
}