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

Use wiki.disk_path

parent b91909d6a07b
......@@ -51,7 +51,7 @@ def repo_path
end
def wiki_path
repo_path + '.wiki'
project.wiki.disk_path
end
def trash_repositories!
......
......@@ -74,7 +74,7 @@ def fetch_remote(forced: false)
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 @@ def initialize(project)
end
def disk_path
"#{project.disk_path}.wiki"
project.wiki.disk_path
end
def import_url
......
......@@ -11,7 +11,7 @@
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