From c627c8fee0111f284e36b3d5ccc8dc41acf79e14 Mon Sep 17 00:00:00 2001 From: Dmitriy Zaporozhets Date: Wed, 20 Nov 2013 12:29:35 +0200 Subject: Fix relative path detection for ssh://host:port/repo.git Signed-off-by: Dmitriy Zaporozhets --- lib/gitlab_shell.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'lib/gitlab_shell.rb') diff --git a/lib/gitlab_shell.rb b/lib/gitlab_shell.rb index 65f7786..252102f 100644 --- a/lib/gitlab_shell.rb +++ b/lib/gitlab_shell.rb @@ -88,7 +88,9 @@ class GitlabShell end def escape_path(path) - if File.absolute_path(path, repos_path) == File.join(repos_path, path) + full_repo_path = File.join(repos_path, path) + + if File.absolute_path(full_repo_path) == full_repo_path path else raise "Wrong repository path" -- cgit v1.2.1