summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames Lopez <james@jameslopez.es>2017-01-16 13:37:04 +0100
committerJames Lopez <james@jameslopez.es>2017-01-16 13:37:04 +0100
commit320cd7f3648b0e30bf48d0fff461d1f79090a589 (patch)
treefc96c3a3c8d7ff9858acbd917a5db677e66e7e9f
parent40fe772279e28b70115ad3d150d84cac579004f5 (diff)
downloadgitlab-ce-320cd7f3648b0e30bf48d0fff461d1f79090a589.tar.gz
fix var inside loop
-rw-r--r--db/migrate/20161226122833_remove_dot_git_from_usernames.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/db/migrate/20161226122833_remove_dot_git_from_usernames.rb b/db/migrate/20161226122833_remove_dot_git_from_usernames.rb
index 4e59cbd8a7f..c3a8f2fd91c 100644
--- a/db/migrate/20161226122833_remove_dot_git_from_usernames.rb
+++ b/db/migrate/20161226122833_remove_dot_git_from_usernames.rb
@@ -68,8 +68,10 @@ class RemoveDotGitFromUsernames < ActiveRecord::Migration
end
def check_routes(base, counter, path)
+ route_exists = route_exists?(path)
+
Gitlab.config.repositories.storages.each_value do |storage|
- if route_exists?(path) || path_exists?(path, storage)
+ if route_exists && path_exists?(path, storage)
counter += 1
path = "#{base}#{counter}"