summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--app/models/namespace.rb3
1 files changed, 3 insertions, 0 deletions
diff --git a/app/models/namespace.rb b/app/models/namespace.rb
index 815672a1bf7..161a16ca61c 100644
--- a/app/models/namespace.rb
+++ b/app/models/namespace.rb
@@ -114,6 +114,9 @@ class Namespace < ActiveRecord::Base
end
def move_dir
+ # Ensure old directory exists before moving it
+ gitlab_shell.add_namespace(path_was)
+
if gitlab_shell.mv_namespace(path_was, path)
# If repositories moved successfully we need to
# send update instructions to users.