Ensure old namespace directory exists before moving it

Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
This commit is contained in:
Dmitriy Zaporozhets 2015-08-06 12:31:24 +02:00
parent ce47dd4bb0
commit d044c14290
No known key found for this signature in database
GPG key ID: 161B5D6A44D3D88A

View file

@ -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.