diff options
Diffstat (limited to 'lib/gitlab_shell.rb')
-rw-r--r-- | lib/gitlab_shell.rb | 4 |
1 files changed, 3 insertions, 1 deletions
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" |