summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/gitlab/git/storage/circuit_breaker.rb5
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/gitlab/git/storage/circuit_breaker.rb b/lib/gitlab/git/storage/circuit_breaker.rb
index f2c52d696cb..fbcdd3aa6d0 100644
--- a/lib/gitlab/git/storage/circuit_breaker.rb
+++ b/lib/gitlab/git/storage/circuit_breaker.rb
@@ -46,9 +46,8 @@ module Gitlab
end
def storage_accessible?
- return false unless File.directory?(storage_path)
-
- Pathname.new(storage_path).realpath
+ realpath = Pathname.new(storage_path).realpath
+ File.directory?(realpath)
rescue Errno::EIO, Errno::ENOENT
false
end