Skip to content

Commit a0447e9

Browse files
author
root
committed
Avoid use of rescue
1 parent 5888b52 commit a0447e9

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

Diff for: config/routes.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141

4242
# Enable SmartHTTP Grack support
4343
mount Grack::Bundle.new({}),
44-
at: (RedmineGitHosting::Config.http_server_subdir rescue '/'),
44+
at: RedmineGitHosting::Config.http_server_subdir,
4545
constraints: lambda { |request| /[-\/\w\.]+\.git\//.match(request.path_info) },
4646
via: [:get, :post]
4747

Diff for: lib/redmine_git_hosting/config/gitolite_access.rb

+2-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,8 @@ def https_server_domain
3434

3535

3636
def http_server_subdir
37-
get_setting(:http_server_subdir)
37+
subdir = get_setting(:http_server_subdir)
38+
subdir.empty? ? '/' : subdir
3839
end
3940

4041

0 commit comments

Comments
 (0)