diff options
Diffstat (limited to 'modules/migrations/restore.go')
-rw-r--r-- | modules/migrations/restore.go | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/modules/migrations/restore.go b/modules/migrations/restore.go index 4e63df1429..5b44811d52 100644 --- a/modules/migrations/restore.go +++ b/modules/migrations/restore.go @@ -83,7 +83,7 @@ func (r *RepositoryRestorer) GetRepoInfo() (*base.Repository, error) { IsPrivate: isPrivate, Description: opts["description"], OriginalURL: opts["original_url"], - CloneURL: opts["clone_addr"], + CloneURL: filepath.Join(r.baseDir, "git"), DefaultBranch: opts["default_branch"], }, nil } @@ -155,7 +155,9 @@ func (r *RepositoryRestorer) GetReleases() ([]*base.Release, error) { } for _, rel := range releases { for _, asset := range rel.Assets { - *asset.DownloadURL = "file://" + filepath.Join(r.baseDir, *asset.DownloadURL) + if asset.DownloadURL != nil { + *asset.DownloadURL = "file://" + filepath.Join(r.baseDir, *asset.DownloadURL) + } } } return releases, nil |