diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2015-08-06 12:31:24 +0200 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2015-08-06 12:31:24 +0200 |
commit | d044c142907a274e5e91a93a8377c6879af80172 (patch) | |
tree | c27ad9a62c4cf9ca95700dde7c4fd1aa4bb29e91 | |
parent | ce47dd4bb0c686aee13b309b07eb8f976aa5d547 (diff) | |
download | gitlab-ce-fix-namespace-move-dir.tar.gz |
Ensure old namespace directory exists before moving itfix-namespace-move-dir
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
-rw-r--r-- | app/models/namespace.rb | 3 |
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. |