summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDouwe Maan <douwe@gitlab.com>2015-04-21 15:01:48 +0200
committerDouwe Maan <douwe@gitlab.com>2015-04-24 14:49:23 +0200
commit2fd47a0e95da2ef2dada1012f09d6c0d1b7431a9 (patch)
treec8ba3ef77feb3db3f3dc04ebddc734f141eac6da
parent4934bc031205c668d4405c2a6faaee32367234d6 (diff)
downloadgitlab-ce-2fd47a0e95da2ef2dada1012f09d6c0d1b7431a9.tar.gz
Don't attempt to move if original path only contains periods.
-rw-r--r--db/migrate/20150421120000_remove_periods_at_ends_of_usernames.rb3
1 files changed, 3 insertions, 0 deletions
diff --git a/db/migrate/20150421120000_remove_periods_at_ends_of_usernames.rb b/db/migrate/20150421120000_remove_periods_at_ends_of_usernames.rb
index e2f231ba709..01ea199d618 100644
--- a/db/migrate/20150421120000_remove_periods_at_ends_of_usernames.rb
+++ b/db/migrate/20150421120000_remove_periods_at_ends_of_usernames.rb
@@ -54,6 +54,9 @@ class RemovePeriodsAtEndsOfUsernames < ActiveRecord::Migration
end
changed_paths.each do |path_was, path|
+ # Don't attempt to move if original path only contains periods.
+ next if path_was =~ /\A\.+\z/
+
if gitlab_shell.mv_namespace(path_was, path)
# If repositories moved successfully we need to remove old satellites
# and send update instructions to users.