summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2015-08-06 16:09:11 +0000
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2015-08-06 16:09:11 +0000
commit2c46cf084bcb0f06121f2fc4374379cc6f45ea0d (patch)
treeaa186f6b499015a2ddb831103471842eb4ef4834
parentdcb0bf0df5e1d786523eec3c80b611d0b266b845 (diff)
parentd044c142907a274e5e91a93a8377c6879af80172 (diff)
downloadgitlab-ce-2c46cf084bcb0f06121f2fc4374379cc6f45ea0d.tar.gz
Merge branch 'fix-namespace-move-dir' into 'master'
Ensure old namespace directory exists before moving it Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> Fixes #983 See merge request !1101
-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.