Use wiki.disk_path

This commit is contained in:
Nick Thomas 2017-10-18 12:53:06 +01:00
parent e4b465d746
commit 314e5b5f20
No known key found for this signature in database
GPG key ID: 2A313A47AFADACE9
4 changed files with 4 additions and 4 deletions

View file

@ -51,7 +51,7 @@ module Projects
end
def wiki_path
repo_path + '.wiki'
project.wiki.disk_path
end
def trash_repositories!

View file

@ -74,7 +74,7 @@ module Github
def fetch_wiki_repository
return if project.wiki.repository_exists?
wiki_path = "#{project.disk_path}.wiki"
wiki_path = project.wiki.disk_path
gitlab_shell.import_repository(project.repository_storage_path, wiki_path, wiki_url)
rescue Gitlab::Shell::Error => e
# GitHub error message when the wiki repo has not been created,

View file

@ -8,7 +8,7 @@ module Gitlab
end
def disk_path
"#{project.disk_path}.wiki"
project.wiki.disk_path
end
def import_url

View file

@ -11,7 +11,7 @@ describe Gitlab::GithubImport::WikiFormatter do
describe '#disk_path' do
it 'appends .wiki to project path' do
expect(wiki.disk_path).to eq project.disk_path + '.wiki'
expect(wiki.disk_path).to eq project.wiki.disk_path
end
end