Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMayra Cabrera <mcabrera@gitlab.com>2018-02-06 03:10:58 +0300
committerDouwe Maan <douwe@gitlab.com>2018-02-06 03:10:58 +0300
commit68a419c8792798cfb09730c4ea52ac16e31c3fc9 (patch)
tree973e75c7941119c19f91107f96a674938daf18dd /app/models/concerns/storage
parent976413ad0f01c1c1f49227c2f5265bda4dc2e548 (diff)
31885 - Ability to transfer a single group to another group
Diffstat (limited to 'app/models/concerns/storage')
-rw-r--r--app/models/concerns/storage/legacy_namespace.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/app/models/concerns/storage/legacy_namespace.rb b/app/models/concerns/storage/legacy_namespace.rb
index b12c10a84de..67a988addbe 100644
--- a/app/models/concerns/storage/legacy_namespace.rb
+++ b/app/models/concerns/storage/legacy_namespace.rb
@@ -14,7 +14,11 @@ module Storage
# Ensure old directory exists before moving it
gitlab_shell.add_namespace(repository_storage_path, full_path_was)
+ # Ensure new directory exists before moving it (if there's a parent)
+ gitlab_shell.add_namespace(repository_storage_path, parent.full_path) if parent
+
unless gitlab_shell.mv_namespace(repository_storage_path, full_path_was, full_path)
+
Rails.logger.error "Exception moving path #{repository_storage_path} from #{full_path_was} to #{full_path}"
# if we cannot move namespace directory we should rollback