Commit 03beb297 authored by Nick Thomas's avatar Nick Thomas Committed by Winnie Hellmann

Use wiki.disk_path

parent 4f62f309
......@@ -51,7 +51,7 @@ module Projects
end
def wiki_path
repo_path + '.wiki'
project.wiki.disk_path
end
def trash_repositories!
......
......@@ -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,
......
......@@ -8,7 +8,7 @@ module Gitlab
end
def disk_path
"#{project.disk_path}.wiki"
project.wiki.disk_path
end
def import_url
......
......@@ -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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment