diff options
Diffstat (limited to 'lib/gitlab/repo_path.rb')
-rw-r--r-- | lib/gitlab/repo_path.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/gitlab/repo_path.rb b/lib/gitlab/repo_path.rb index 3591fa9145e..1fa2a19b0af 100644 --- a/lib/gitlab/repo_path.rb +++ b/lib/gitlab/repo_path.rb @@ -21,16 +21,16 @@ module Gitlab result = repo_path storage = Gitlab.config.repositories.storages.values.find do |params| - repo_path.start_with?(params['path']) + repo_path.start_with?(params.legacy_disk_path) end if storage - result = result.sub(storage['path'], '') + result = result.sub(storage.legacy_disk_path, '') elsif fail_on_not_found raise NotFoundError.new("No known storage path matches #{repo_path.inspect}") end - result.sub(/\A\/*/, '') + result.sub(%r{\A/*}, '') end def self.find_project(project_path) |