diff options
author | Unknwon <u@gogs.io> | 2017-02-21 22:00:45 -0500 |
---|---|---|
committer | Unknwon <u@gogs.io> | 2017-02-21 22:00:45 -0500 |
commit | d21dc0da78f423e471eff408c5a890ab33453ecf (patch) | |
tree | 04eb7f95ebb372c737d499830403101d6d4cb812 /models/repo.go | |
parent | 60aca9ea18f4fed6c98c83d41036f9a34fdbd28c (diff) |
migrate: fix unexpected removal of repository when wiki is detected
Diffstat (limited to 'models/repo.go')
-rw-r--r-- | models/repo.go | 4 |
1 files changed, 2 insertions, 2 deletions
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) } } |