From d21dc0da78f423e471eff408c5a890ab33453ecf Mon Sep 17 00:00:00 2001 From: Unknwon Date: Tue, 21 Feb 2017 22:00:45 -0500 Subject: migrate: fix unexpected removal of repository when wiki is detected --- models/repo.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'models/repo.go') diff --git a/models/repo.go b/models/repo.go index f39526c3..67adf20d 100644 --- a/models/repo.go +++ b/models/repo.go @@ -655,14 +655,14 @@ func MigrateRepository(u *User, opts MigrateRepoOptions) (*Repository, error) { wikiRemotePath := wikiRemoteURL(opts.RemoteAddr) if len(wikiRemotePath) > 0 { - RemoveAllWithNotice("Repository wiki path erase before creation", repoPath) + RemoveAllWithNotice("Repository wiki path erase before creation", wikiPath) if err = git.Clone(wikiRemotePath, wikiPath, git.CloneRepoOptions{ Mirror: true, Quiet: true, Timeout: migrateTimeout, }); err != nil { log.Trace("Fail to clone wiki: %v", err) - RemoveAllWithNotice("Delete repository wiki for initialization failure", repoPath) + RemoveAllWithNotice("Delete repository wiki for initialization failure", wikiPath) } } -- cgit v1.2.3