diff options
author | Josh Frye <joshfng@gmail.com> | 2016-02-11 19:26:51 -0500 |
---|---|---|
committer | Josh Frye <joshfng@gmail.com> | 2016-02-11 19:26:51 -0500 |
commit | ce3708b3ea1e2c5dcfeb4cf852651cbda2dfd88c (patch) | |
tree | f49f05aa42c571f86fa22ba8ebdfe64d4eec6250 /models | |
parent | 23bc9a29113991dd3f2d8d5e183a8c97309feba3 (diff) | |
download | gitea-ce3708b3ea1e2c5dcfeb4cf852651cbda2dfd88c.tar.gz gitea-ce3708b3ea1e2c5dcfeb4cf852651cbda2dfd88c.zip |
Remove local wiki copy on repo transfer. Fixes #2558
Diffstat (limited to 'models')
-rw-r--r-- | models/repo.go | 1 |
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) } |