From d044c142907a274e5e91a93a8377c6879af80172 Mon Sep 17 00:00:00 2001 From: Dmitriy Zaporozhets Date: Thu, 6 Aug 2015 12:31:24 +0200 Subject: Ensure old namespace directory exists before moving it Signed-off-by: Dmitriy Zaporozhets --- app/models/namespace.rb | 3 +++ 1 file changed, 3 insertions(+) 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. -- cgit v1.2.1