diff options
author | Nick Thomas <nick@gitlab.com> | 2017-11-17 15:32:33 +0000 |
---|---|---|
committer | Nick Thomas <nick@gitlab.com> | 2017-11-17 17:50:52 +0000 |
commit | 9b3b0f02a6ffc16e61f237f2757ff2990610225e (patch) | |
tree | 82189c2c6371676e03bd73e20cf81a8d0db0143c /app | |
parent | e68ee8af4d981cb7b83fae76c0a94059add495fb (diff) | |
download | gitlab-ce-9b3b0f02a6ffc16e61f237f2757ff2990610225e.tar.gz |
Fix project transfer with hashed-storage attachments
Diffstat (limited to 'app')
-rw-r--r-- | app/services/projects/transfer_service.rb | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/app/services/projects/transfer_service.rb b/app/services/projects/transfer_service.rb index d3a8ae8d7c6..e5cd6fcdfe3 100644 --- a/app/services/projects/transfer_service.rb +++ b/app/services/projects/transfer_service.rb @@ -67,7 +67,7 @@ module Projects Labels::TransferService.new(current_user, @old_group, project).execute # Move uploads - Gitlab::UploadsTransfer.new.move_project(project.path, @old_namespace.full_path, @new_namespace.full_path) + move_project_uploads(project) # Move pages Gitlab::PagesTransfer.new.move_project(project.path, @old_namespace.full_path, @new_namespace.full_path) @@ -139,5 +139,15 @@ module Projects # Move wiki repo also if present move_repo_folder("#{@old_path}.wiki", "#{@new_path}.wiki") end + + def move_project_uploads(project) + return if project.hashed_storage?(:attachments) + + Gitlab::UploadsTransfer.new.move_project( + project.path, + @old_namespace.full_path, + @new_namespace.full_path + ) + end end end |